playMaker

Author Topic: random position, rotation  (Read 195 times)

nabilfx

  • Full Member
  • ***
  • Posts: 186
    • View Profile
random position, rotation
« on: June 20, 2019, 08:26:49 AM »
how can i do a Random position, and random rotation of an object, slow moving?
in a loop
« Last Edit: June 20, 2019, 08:28:34 AM by nabilfx »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4614
    • View Profile
    • jinxtergames
Re: random position, rotation
« Reply #1 on: June 20, 2019, 02:12:31 PM »
Hi.
You can use random float for each direction (x,y,z)

if you want it from a list of preset vector 3's
Then you can use 'Select Random Vector3' or you an array and random array.

Same for position and rotation.

nabilfx

  • Full Member
  • ***
  • Posts: 186
    • View Profile
Re: random position, rotation
« Reply #2 on: June 20, 2019, 02:38:13 PM »
here example

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4614
    • View Profile
    • jinxtergames
Re: random position, rotation
« Reply #3 on: June 20, 2019, 03:07:06 PM »
Hi.
Random same as on my 1st post, but set them as new position.

Then use 'Vector 3 Interpolate' the 1st vector is old position,
Then 2nd vector new position.

When finished,
use 'set vector 3'  set 'new position' to 'old position'

loop back to get new random.

Same for rotation on a separate fsm

You can even randomize time to do the interpolate.

nabilfx

  • Full Member
  • ***
  • Posts: 186
    • View Profile
Re: random position, rotation
« Reply #4 on: June 20, 2019, 10:11:54 PM »
I have 8 object, i need all of them in diferent random position and rotation loop, very slow and very short movement. Can u help me do that eith fsm.