playMaker

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

Handrews

  • Playmaker Newbie
  • *
  • Posts: 16
    • View Profile
Translate to a direction
« on: March 04, 2020, 01: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: 4968
    • View Profile
    • jinxtergames
Re: Translate to a direction
« Reply #1 on: March 05, 2020, 02: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: 16
    • View Profile
Re: Translate to a direction
« Reply #2 on: March 05, 2020, 09: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: 4968
    • View Profile
    • jinxtergames
Re: Translate to a direction
« Reply #3 on: March 05, 2020, 11:14:13 PM »
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