playMaker

Author Topic: How to move object forward in rotation direction using Transform  (Read 2240 times)

EverySingleSoldier

  • Playmaker Newbie
  • *
  • Posts: 26
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
« Last Edit: July 23, 2019, 11:08:04 AM by EverySingleSoldier »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How do I get an object to move forward at the current rotation (3D)
« Reply #1 on: July 23, 2019, 07:19:38 AM »
Hi.
"Set Velocity" with "space" 'self' should work

EverySingleSoldier

  • Playmaker Newbie
  • *
  • Posts: 26
Re: How do I get an object to move forward at the current rotation (3D)
« Reply #2 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 ?
« Last Edit: July 23, 2019, 12:15:52 PM by EverySingleSoldier »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to move object forward in rotation direction using Transform
« Reply #3 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

EverySingleSoldier

  • Playmaker Newbie
  • *
  • Posts: 26
Re: How to move object forward in rotation direction using Transform
« Reply #4 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 ?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How to move object forward in rotation direction using Transform
« Reply #5 on: August 02, 2019, 07:29:01 PM »
Hi

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

but disable controls before doing this.