michael.zhang Posted October 11, 2010 Share Posted October 11, 2010 Hello, I am using the built in Unigine high level script character system. Trying to configure in such a way that it continues to handle damping and acceleration, but does NOT become affected by gravity! I've created a simple test scene which (hopefully) has no other dependencies besides the attached file. When you run this program, a character should appear on a sloped object. The character will slide down the slope without input. This is undesirable. When input is provided he should move, and accelerate. When input is removed, decceleration until halt should occur. Further sliding due to gravity should not occur. Any help in achieving this effect using the Character system would be greatly appreciated :( Thanks, Michael Sliding Character.zip Link to comment
Guest extaliones Posted October 13, 2010 Share Posted October 13, 2010 We will test this problem, please, stand by. Link to comment
michael.zhang Posted October 14, 2010 Author Share Posted October 14, 2010 We will test this problem, please, stand by. Hello, I have another question about the character system. Right now, when the character is not moving, but is turning, there is a delay between the rotation of the character's transform and the turning animation. This causes a disconnect between the rotation of the character and the direction of the character's forward direction. I would like the character to face forward as the character turns. I've been having trouble locating where this logic is located in script/config files. Thanks, Michael Link to comment
michael.zhang Posted October 22, 2010 Author Share Posted October 22, 2010 We will test this problem, please, stand by. Any update on solving this problem? Link to comment
Guest extaliones Posted October 22, 2010 Share Posted October 22, 2010 Alexander is already involved in your problem, please, stand by. Link to comment
Guest extaliones Posted October 25, 2010 Share Posted October 25, 2010 Any update on solving this problem? The problem is solved. In the next update it will be available. Note that only nonphysical player is being protected from sliding. Link to comment
michael.zhang Posted October 25, 2010 Author Share Posted October 25, 2010 The problem is solved. In the next update it will be available. Note that only nonphysical player is being protected from sliding. Okay, sounds good! :) Am I correct in assuming that a nonphysical player does not handle decceleration/acceleration? Finally, when can I expect the next update? And how will I be notified / how do I access it? By e-mail? Thanks, Michael Link to comment
michael.zhang Posted November 8, 2010 Author Share Posted November 8, 2010 Okay, so I moved over to the new SDK, but the sliding problem remains? I have set the physical flag in the agent.character to a value of 0. Link to comment
michael.zhang Posted November 15, 2010 Author Share Posted November 15, 2010 Okay, so I moved over to the new SDK, but the sliding problem remains? I have set the physical flag in the agent.character to a value of 0. Bump. I am calling character.actor.setPhysical(0); as well as setting the .character file xml attribute to be 0. Neither of these prevent the sliding? Were your changes included in the latest SDK? Link to comment
ivan.cuevas Posted November 24, 2010 Share Posted November 24, 2010 I have similar problem, I configured a camera system very similar to actor_01.cpp sample as follows: void CameraSystem::_setup_players() { float min_theta = 5.0f; float max_theta = 80.0f; float velocity = 40.0f; float acceleration = 7.0f; float distance = 40.0f; p_actor = new PlayerActor(); p_actor.setMinThetaAngle(min_theta); p_actor.setMaxThetaAngle(max_theta); p_actor.setJumping(0.0f); p_actor.setMaxVelocity(velocity); p_actor.setMinVelocity(velocity); p_actor.setDamping(5.0f); p_actor.setAcceleration(10.0f); p_actor.setPhysicalMass(-1.0f); //no mass p_actor.setPhysical(0); //no physical p_actor.setCollider(0); //disables collision test p_actor.setPosition(vec3(0.0f,0.0f,0.0f)); p_actor.setThetaAngle(0.0f); p_actor.setPhiAngle(-90.0f); p_persecutor = new PlayerPersecutor(); p_persecutor.setControls(0); p_persecutor.setAnchor(vec3_z); p_persecutor.setMinDistance(distance); p_persecutor.setMaxDistance(distance); p_persecutor.setDistance(distance); p_persecutor.setMinThetaAngle(min_theta); p_persecutor.setMaxThetaAngle(max_theta); p_persecutor.setThetaAngle(10.0f); p_persecutor.setTarget(p_actor); engine.game.setPlayer(p_persecutor); } I want my actor never get affected by gravity or collisions (actually it falls when is outside a base plane) like if it was a ghost :) Link to comment
frustum Posted March 9, 2011 Share Posted March 9, 2011 I have added gravity flag for bodies. You can get body from PlayerActor and disable gravity. There is collision flag and collision mask in PlayerActor for collision handling. Link to comment
michael.zhang Posted March 9, 2011 Author Share Posted March 9, 2011 I have added gravity flag for bodies. You can get body from PlayerActor and disable gravity. There is collision flag and collision mask in PlayerActor for collision handling. Thank you very much, Frustum! I've been waiting for this fix for some time. Link to comment
ivan.cuevas Posted March 12, 2011 Share Posted March 12, 2011 I have added gravity flag for bodies. You can get body from PlayerActor and disable gravity. There is collision flag and collision mask in PlayerActor for collision handling. Thank you! :) Link to comment
Recommended Posts