Author Topic: Accelerometer tilt movement  (Read 1273 times)

Jonnydarcy

  • Newbie
  • *
  • Posts: 13
    • View Profile
Accelerometer tilt movement
« on: May 05, 2015, 05:47:22 pm »
I'm not sure if this feature is in or not but I've just tried to manipulate the particles by adding a gravity move script into the scene but to no effect . Id this there , I'm sure I can do it anyway , just wondering

Physical_Liquid_Conor

  • Administrator
  • Full Member
  • *****
  • Posts: 208
    • View Profile
Re: Accelerometer tilt movement
« Reply #1 on: May 05, 2015, 06:38:37 pm »
Hi Jonnydarcy,

This would be outside the scope of the actual plugin but it might be a good example scene to add. The basic idea is simple, take the accelerometer data and create a Vector2 out of it, then use this as the world gravity.

Some function calls you might want to use to achieve this effect :

Code: [Select]
LPAPIWorld.SetWorldGravity(IntPtr world, float gravityX, float gravityY);
LPAPIParticleGroup.ApplyForceToParticleGroup(IntPtr particleGroupPointer, float forceX, float forceY);

This first call sets the gravity for every object in the world. The second can be used to apply a force to a specific particle group.

Jonnydarcy

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Accelerometer tilt movement
« Reply #2 on: May 05, 2015, 07:44:34 pm »
Would I not use vector3 ? On those particles ?

Annabef

  • Newbie
  • *
  • Posts: 32
    • View Profile
Accelerometer tilt movement
« Reply #3 on: June 25, 2016, 06:32:58 am »
Beh... I can move player anywhere by script but not with movement graphic.... but in effect I can command graphic actions... or I am wrong?

___
XRumer 12.0.17 + SocPlugin: Effective software for promotion in FB, etc.