playMaker

Author Topic: [SOLVED]Get Axis Vector in (zero gravity physics)  (Read 1928 times)

Martin-Vaupell

  • Junior Playmaker
  • **
  • Posts: 69
  • Creating CarbonDiOxide
    • View Profile
    • Evisystems
[SOLVED]Get Axis Vector in (zero gravity physics)
« on: January 30, 2014, 01:04:14 PM »
Scene with a spaceship and basic controllers

-> Get axis vector
----->moveVector
-> Controller Simple Move -- >moveVector

and got a Character controller on aswell.

It works fine, i can move the player etc.
However, when i go into project settings > physics and set gravity to 0

Get Axis Vector does not get input from Vertical and Horizontal anymore.
That means you can't control anything.

Any idea why  ?
« Last Edit: January 31, 2014, 05:20:28 AM by Martin-Vaupell »

Martin-Vaupell

  • Junior Playmaker
  • **
  • Posts: 69
  • Creating CarbonDiOxide
    • View Profile
    • Evisystems
Re: Get Axis Vector in (zero gravity physics)
« Reply #1 on: January 31, 2014, 02:54:47 AM »

To test further i have added the movement vector to the inspector.
And while gravity is above or below 0 it works as usual

With gravity at 0 playMaker does not get input from horizontal or vertical :(

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14703
  • Official Playmaker Support
    • View Profile
Re: Get Axis Vector in (zero gravity physics)
« Reply #2 on: January 31, 2014, 04:35:45 AM »
Hi,

 Unity Character controller is not affected by gravity, it has its own setting for that.

I think the problem is elsewhere, can you debug the actual values of the action "Get axis" to make sure that indeed they are 0 or not.


bye,

 Jean

Martin-Vaupell

  • Junior Playmaker
  • **
  • Posts: 69
  • Creating CarbonDiOxide
    • View Profile
    • Evisystems
Re: Get Axis Vector in (zero gravity physics)
« Reply #3 on: January 31, 2014, 04:54:19 AM »
Been looking into things..

Get axis is storing the vector3 correctly as shown in the video.
both with and without gravity.

SimpleMove does not move without gravity but moves fine with gravity
also shown in the video.

I'm using a "invisible" floor right now, but it sometimes gives the wrong effect
so i would prefer to go Zero gravity instead of the floor..

debug video


Any advice?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14703
  • Official Playmaker Support
    • View Profile
Re: Get Axis Vector in (zero gravity physics)
« Reply #4 on: January 31, 2014, 05:03:36 AM »
Hi,

 You should not be using a character controller for this, but instead a regular physics object. All will be much easier and predictable then.

bye,

 Jean

Martin-Vaupell

  • Junior Playmaker
  • **
  • Posts: 69
  • Creating CarbonDiOxide
    • View Profile
    • Evisystems
Re: Get Axis Vector in (zero gravity physics)
« Reply #5 on: January 31, 2014, 05:20:19 AM »

Oh right..  /facepalm

You're right! 

Thank you