Monowheel - Angular Velocity or Raycast?

Post Reply
Felix Hansson
Posts: 4
Joined: Fri Apr 06, 2012 1:00 pm

Monowheel - Angular Velocity or Raycast?

Post by Felix Hansson »

Hello
I'm trying to create a mono-wheel vehicle (a vehicle which is a big wheel more or less), I have added a picture of it. Right now it is one big body but I have plans for separating it into three parts, one part on each side of the wheel. The plan is then for the side parts to turn the wheel and thus propelling the vehicle forward, turning the vehicle would be a matter of leaning it to one side (not sure how to do this but I'll save it for later).
As mentioned it is one big body right now and I created some controls for it, to accelerate I merely set an angular velocity on the X-axis and for turning I rotate the object around the global Y-axis. Some issues I'm having is that it bounces on the ground sometimes so you lose control, no ground contact = no traction obviously. Traction was also a slight issue but was solved by increasing the friction. I'm however concerned that the traction and bouncing will become bigger problems at higher velocities and on uneven surfaces, I've checked the raycastvehicle-class and read Vehicle Simulation With Bullet and started thinking that maybe it is a better approach than my current one.
Anyone got any idea on which might be better? Setting the angular velocity or try to implement the raycast model?
Attachments
MonoWheelVehicle.jpg
MonoWheelVehicle.jpg (54.73 KiB) Viewed 6472 times
kloplop321
Posts: 55
Joined: Sun Jan 01, 2012 7:37 pm

Re: Monowheel - Angular Velocity or Raycast?

Post by kloplop321 »

If you really want to be physically based, use tangential forces.

But, if you want something stable that you can depend on, use angular velocities for spinning and modify the spacial velocities yourself as well.

But, does it really have to be in multiple parts? If you're making a game, you only need to approximate it, and from your image, you could easily just use a sphere or two cylinders in a compound shape.

(Spheres are easier to compute and thus faster too)

I would probably use raycasting to figure out the traction on the surface.
Felix Hansson
Posts: 4
Joined: Fri Apr 06, 2012 1:00 pm

Re: Monowheel - Angular Velocity or Raycast?

Post by Felix Hansson »

The reason for having multiple parts is that the side parts are not going to spin, only the center part (the wheel) will, at least that is the plan for the time being. Plus that we´re going to attach various weapons and whatnot on the sides, since this is as you suspected for a game :)
I did think about slapping the side parts together into one piece though, depends on what makes it easier to apply animations
MaxDZ8
Posts: 149
Joined: Fri Jun 24, 2011 8:53 am

Re: Monowheel - Angular Velocity or Raycast?

Post by MaxDZ8 »

This is incorrect. The graphics does not care what the physics modelling will be. A single part will be sufficient (a ball). There is no need to physically model this as multiple objects.
Post Reply