Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: EverySingleSoldier on July 23, 2019, 04:52:42 AM

Title: How to move object forward in rotation direction using Transform
Post by: EverySingleSoldier on July 23, 2019, 04:52:42 AM
I am making a game whereby a character needs to be able to only move forward in the direction of it's current forward facing direction, when 'W' key is selected, the 'A' and 'D' keys will change rotation.

I don't want to use rigidbody so can't use Set velocity etc
Thanks
Title: Re: How do I get an object to move forward at the current rotation (3D)
Post by: djaydino on July 23, 2019, 07:19:38 AM
Hi.
"Set Velocity" with "space" 'self' should work
Title: Re: How do I get an object to move forward at the current rotation (3D)
Post by: EverySingleSoldier on July 23, 2019, 07:36:32 AM
Thanks, is there a way to use transform to move in the direction of the rotation as opposed to using force vectors , as now my objects need a rigid body and collide with other colliders, which I don't want ?

Alternatively how can prevent collisions when the object now has a Rigid Body component ?
Title: Re: How to move object forward in rotation direction using Transform
Post by: jeanfabre on July 24, 2019, 02:11:02 AM
Hi,

 I just revamped a bullet firing system from a rotating spaceship, this would be of interest for you to understand how to do this:

https://hutonggames.com/playmakerforum/index.php?topic=20874.0

Bye,

Jean
Title: Re: How to move object forward in rotation direction using Transform
Post by: EverySingleSoldier on August 01, 2019, 04:03:50 PM
Is there a way to just freeze the character I.e. cancel all physics and get the character to just stop ?
Title: Re: How to move object forward in rotation direction using Transform
Post by: djaydino on August 02, 2019, 07:29:01 PM
Hi

I usually use , set velocity to 0,0,0

but disable controls before doing this.