Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: HeathClose on April 03, 2017, 04:31:31 PM
-
so i have a 2d drone that i want to fly from one point to the other... and i want to get the speed every frame and set the rotation every frame according to how fast it's going... so like a helicopter, it tilts more the faster it goes... so as it eases in and out.. the tilt will change with the speed....
what can i use to move the object so it has an ease to it because if I use move towards or itween or the like... the object doesn't return a speed or velocity... but if I just set up a velocity or constant force... it doesn't ease at all...
any suggestions?
(https://www.dropbox.com/s/r9ou7kv85icsd41/Screenshot%202017-04-03%2015.29.57.png?dl=1)
(https://www.dropbox.com/s/s6h4tk9todnxpsk/Screenshot%202017-04-03%2015.29.50.png?dl=1)
-
Hi,
Check out the sample on "Movement constraint" it has a tilting fsm that tilt based on velocity, this is exactly what you need, more or less because actually, tilt is pro active to the speed and not the opposite, but if you are faking the physics controls of the drone, it's good enough of course. IT will be also true for breaking, if you want to break the drone will first tilt and then propellers thrust will break the speed.
Bye,
Jean
-
Hi,
Check out the sample on "Movement constraint" it has a tilting fsm that tilt based on velocity, this is exactly what you need, more or less because actually, tilt is pro active to the speed and not the opposite, but if you are faking the physics controls of the drone, it's good enough of course. IT will be also true for breaking, if you want to break the drone will first tilt and then propellers thrust will break the speed.
Bye,
Jean
i looked through my playmaker hierarchy and on the game samples wiki page.. i don't see it... where do i find this movement constraint sample
-
Hi,
On the Ecosystem sorry :)
Bye,
Jean
-
Hi,
On the Ecosystem sorry :)
Bye,
Jean
I imported the movement constraint sample and I see the playmakersamples folder and the testlabs folder and the materials and textures... but there isn't any scene anywhere
-
Hi,
Ok, when you import from the Ecosystem and the entry goes green, you can click on it and it will highlight either the scene, the script or a menu item indicating where it is in the project.
(http://i.imgur.com/187fAbN.gif)
so you should have it :)
Bye,
Jean
-
Hi,
Ok, when you import from the Ecosystem and the entry goes green, you can click on it and it will highlight either the scene, the script or a menu item indicating where it is in the project.
(http://i.imgur.com/187fAbN.gif)
so you should have it :)
Bye,
Jean
Ahhh... thank you
so I have the tilt fsm in my drone now... but I'm having trouble figuring out how to make this work in 2d... by the time i get down to the quaternion euler action I'm not sure what to use after that to work with a 2d rigidbody
-
Hi,
you don't touch the quat actions, it's how you check the velocity that matters, you have to pick the right axis for this. Quaternions works exactly the same for 3d and 2d, no difference here.
Bye,
Jean