Playmaker Forum
PlayMaker Feedback => Action Requests => Topic started by: VictorRayDev on November 10, 2014, 10:41:25 AM
-
Hi!
I'd need this action please.
http://docs.unity3d.com/ScriptReference/Rigidbody2D.AddRelativeForce.html
Currently the addforce 2d is not relative to the rotation of the object.
I'm doing a little 2d golf game and I'd need to add the force relatively to the rotation of the ball.
Maybe it is already possible but I don't see a way to do it.
Thanks guys! 8)
-
Hi,
I solved this with the trig actions- not exactly what you're asking but it would be a solution:
http://hutonggames.com/playmakerforum/index.php?topic=5677.msg27322#msg27322
Cheers,
Nick
-
it is a little bit complex for something to be so simple via local force :P.
I'm going to give your technique a go.
-
Yeah- it is fairly complex, but in the end neater than trying to make the rotation do what you'd want. I would guess you're only applying the force for one frame when you hit the ball, otherwise be sure to run the trig equations every frame if you're varying the angle or force.
-
Thanks Nick! Followed your instruction work perfectly!
-
Cool, glad to hear!