Need help with a steering wheel

patapplepatapple Member Posts: 873
edited July 2012 in Working with GS (Mac)
hi guys,

i need to create a wheel to drive my car like this one.

image

i only know that i need to constrain the rotation but i have no idea how to do it! :D

thanks

Best Answers

  • UtopianGamesUtopianGames Posts: 5,692
    edited July 2012 Accepted Answer
    At the 1:40 mark in the video is this what your after?

    The wheel saves the previous rotation so if you lift finger off and replace it doesn't snap back to centre.



    image

    Darren.
  • UtopianGamesUtopianGames Posts: 5,692
    Accepted Answer
    Posted an image of the rules, right click/view image.

    Darren.
  • UtopianGamesUtopianGames Posts: 5,692
    Accepted Answer
    Think your going to have to only constrain if speed of car is higher than a set point.

    Darren.

Answers

  • patapplepatapple Member Posts: 873
    @UtopianGames yes, exactly
  • patapplepatapple Member Posts: 873
    edited July 2012
    Thanks! Now i try ;)
  • WTDeveloperWTDeveloper Member Posts: 352
    @UtopianGames
    can you please check your PM's ?
  • patapplepatapple Member Posts: 873
    thanks @UtopianGames for the rules but i am having another problem. How can I connect your game attribute carAngle to the rotation of the car?

    if i put a constrain attribute it continuously move also when the car is stopped. :)

    thanks for help me
  • Luke20wLuke20w Member, PRO Posts: 50

    I can't see the picture can u add a video or another picture of the code.

  • UtopianGamesUtopianGames Member Posts: 5,692

    @patapple Sounds like you need to make a rule if cars speed > 50 for e.g. constrain.

    You can determine an actors speed by doing magnitude(self.motion.linear.velocity.X,self.motion.linear.velocity.Y)

    I used a more advanced method for GSRacerz 3D below…

    Darren.

Sign In or Register to comment.