playMaker

Author Topic: Translate to a direction  (Read 1383 times)

Handrews

  • Playmaker Newbie
  • *
  • Posts: 36
  • 3D Artist & Game Developer
    • Thetra Games Artstation
Translate to a direction
« on: March 04, 2020, 03:31:08 PM »
Hi!

I need that an object translates in the same direction the camera is looking.

How i get the direction to use it in Vector3 of Translate Action?

Ty

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Translate to a direction
« Reply #1 on: March 05, 2020, 04:43:13 AM »
Hi.
Maybe 'Get Rotation' From Camera, then 'Set Rotation' to object and translate forward direction (set Space to self)

Handrews

  • Playmaker Newbie
  • *
  • Posts: 36
  • 3D Artist & Game Developer
    • Thetra Games Artstation
Re: Translate to a direction
« Reply #2 on: March 05, 2020, 11:52:45 AM »
Yep it worked...but i thought there would be a way to do it without rotate the object.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Translate to a direction
« Reply #3 on: March 06, 2020, 01:14:13 AM »
Hi.
Maybe attach the object to the camera and move the camera,
can you give some more details as it kind of depends on your setup