playMaker

Author Topic: Sample curve that works between -1 to 1?  (Read 3118 times)

derkoi

  • Full Member
  • ***
  • Posts: 187
Sample curve that works between -1 to 1?
« on: December 24, 2012, 10:35:07 AM »
I'm making a driving game and using the accelerometer to steer the car. I'd like to use a sample curve so that the steering feels better.
I tried the sample curve action and it works perfectly apart from only going from 0 to 1 so my car only turns right, how can I sample from -1 to 1?

Thanks

derkoi

  • Full Member
  • ***
  • Posts: 187
Re: Sample curve that works between -1 to 1?
« Reply #1 on: January 04, 2013, 06:11:36 AM »
Anyone?

kiriri

  • Hero Member
  • *****
  • Posts: 506
Re: Sample curve that works between -1 to 1?
« Reply #2 on: January 04, 2013, 08:04:37 AM »
Hey,
Can you divide the Sample At position by 2 and add 0.5?
This will make 0 to 0.5
- 1 to 0
1 to 1

just an idea though, I have't tested it.
Best,
Sven

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Sample curve that works between -1 to 1?
« Reply #3 on: January 07, 2013, 03:20:56 AM »
Hi,

 you can drag your cruve points into negative values on all axis, I am not sure where the problem is, you should be able to make a curve going from -1 to 1

bye,

 Jean

derkoi

  • Full Member
  • ***
  • Posts: 187
Re: Sample curve that works between -1 to 1?
« Reply #4 on: January 07, 2013, 03:46:35 AM »
 ::)

Can't believe I didn't think of that! I even posted on the Unity forums and no one suggested that.

Thanks Jean.  ;D

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Sample curve that works between -1 to 1?
« Reply #5 on: January 07, 2013, 05:32:37 AM »
Hi,

 send me a link to UA post, I'll reply here too

bye,

 Jean