playMaker

Author Topic: Arcade Racer: direct contols and physics?  (Read 1097 times)

Ghosu

  • Playmaker Newbie
  • *
  • Posts: 10
    • View Profile
Arcade Racer: direct contols and physics?
« on: February 21, 2016, 02:37:41 AM »
Hi folks

Currently i'm working on some kind of racing game using Playmaker...and my biggest problem right now is to get the controls right. It's arcade style and movement will be direct, so when i move the joystick to the left the car should move directly there (not like forward=accelerate, backwards=brake,left/right = steering). I'm quite happy with the current controls, though i don't get it to work with physics.

There will be plenty physics in the game like jumping over ramps, colliding with other players or objects, get hit by stuff and whatever. I tried several methods, atm i'm using method B on this screenshot in combination with the smooth look at direction action.



PROTOTYPE VIDEO: https://youtu.be/SgksJBUH1Qg

Though, the problem is: the smooth look at action locks the rotation of my game object, in the video's first segment right after the steering test i click on the car to apply a force - it just "jumps" without any kind of rotation, same when i drive over a ramp with upwards angle - ofc the look direction doesn't change. I guess this can be fixed if i use something like raycasts and normal check to adjust rotation - but the problem with physics not interacting with rotation will still remain.

Maybe use just a rotate action to rotate a single axis to adjust direction and fix the tilt rotation for ramps with raycasts...there must be a better way?

In the second part of the prototype video i'm using wheel colliders to control both cars - works just fine and can be adjusted to feel like arcade i guess. Though no direct contols, left/right is for steering so this would need adjustment. But using a rigidbody with forces still feels a bit better...so, any helpful ideas?

Thanks and have a nice weekend,
Matthias
« Last Edit: February 21, 2016, 02:40:34 AM by Ghosu »

Ghosu

  • Playmaker Newbie
  • *
  • Posts: 10
    • View Profile
Re: Arcade Racer: direct contols and physics?
« Reply #1 on: February 24, 2016, 12:04:03 AM »

Ghosu

  • Playmaker Newbie
  • *
  • Posts: 10
    • View Profile
Re: Arcade Racer: direct contols and physics?
« Reply #2 on: February 27, 2016, 11:38:57 AM »
Managed to get what i want...at least the base is finished, needs some bugfixing and tweaking but it should work. Physics based control only, using side forces to rotate the rigidybody - direct controls, car drives to the controller axis direction. No look at function that locks rotation any more so the car interacts with colliders all the time.

https://youtu.be/LNuH42EBaKU

greetings

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3389
    • View Profile
    • jinxtergames
Re: Arcade Racer: direct contols and physics?
« Reply #3 on: February 28, 2016, 10:42:58 AM »
Hi,
Your Prototype video looks very promising and i am happy you managed to get what you want and share it with us :)

Would it be possible to share a sample project on how you have set this up, or make a video of it?