Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: SandstroM on November 04, 2014, 08:32:27 PM
-
Hey guys, i'm having a bit of trouble with moving my player character smoothly.
I'm using "AddForce2D" to move my player's ship. It can move around just fine, and it works as i want it to - except every second or so i get a small "jump" or "skip" on the player sprite. Originally i thought it was my camera (Because it is set to follow the player therefore showing the skips too) or the Vsync options, but looking in the scene view at runtime I noticed it was JUST the player ship having skipping/jumping issues. After some research i saw people have been mentioning a "FixedUpdate" solution for the "AddForce2D" script, that apparently can help/fix it - but im not sure i want to edit the code of these functions without first consulting you guys.
Also its worth mentioning that i can move the ship without the skipping if i use translate, but it does not have the gravity force that i want like AddForce does.
If anyone can help me out with this, that would be fantastic, as i'm really not sure why it is doing this.
Thanks =)
-
Oh yeah, i forgot to mention - im building for Android.
-
This may have something to do with the scale of the sprite. Also you may want to look at the mass scale on the rigidbody combined with gravity.
Think this may help
Cheers
Rob
-
Hey Rob, I have done multiple tests with more/less mass, interpolate/extrapolate, and a smaller/larger sprite - and i still get the same issue on movement. Been bugging me for a few days now XD
Thank you
-
Still cant get this to work... anyone have any idea?
-
just a thought and don't know if it is happening but is every frame checked?
-
Yes, every frame is checked, the player will be flying a space ship so i need the force to be applied constantly
-
Is it interacting with other rigid bodies in your scene. I had an issue where one rigid body was effecting the other
-
The only interaction it has with other rigidbodies is when the ship collides with another, theres only 1 rigidbody per game object.