ayoub05 / vdrift-ogre

Automatically exported from code.google.com/p/vdrift-ogre
0 stars 0 forks source link

Camera extensions #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Under certain conditions, the camera can sink below the ground in its current 
implementation (e.g. car behind a hill). What would be needed is a simple check 
if the camera is below the terrain, and if it is, move it just a little bit 
over the terrain.

Original issue reported on code.google.com by scrawl...@gmail.com on 4 Apr 2011 at 12:53

GoogleCodeExporter commented 9 years ago
Fix in hg. Can someone test?

Original comment by scrawl...@gmail.com on 4 Apr 2011 at 1:22

GoogleCodeExporter commented 9 years ago
Working.
We could extend it with casting a ray in bullet so camera also doesn't go into 
road in air or through pipes. But that's more tweaking.

Original comment by Cry...@gmail.com on 6 Apr 2011 at 12:07

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
If I get bored some time I will do the raycasting stuff.

Original comment by scrawl...@gmail.com on 8 Apr 2011 at 11:47

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Below ground is done since ages, I'm changing issue summary.
Would be useful in loops, but it requires lots of tweaking and isn't that 
important.

Original comment by Cry...@gmail.com on 1 Nov 2011 at 10:33

GoogleCodeExporter commented 9 years ago
Some new extensions are required since few tracks aren't drivable (with a 
camera behind car), best seen on tracks:
S13-Hole, F12-HighPeaks, A3-Snake, X2-Swirl, F10-MntnTrail.

I'd rather leave A2-PipeCoil and S12-Infinity as they are, since camera outside 
glass pipe doesn't disturb.
But in asphalt pipe like in A3-Snake, J5-Pipes, J6-80fun it's bad.

Few high terrain slopes are on
I5-Shore, G1-Long, F10-MntnTrail, X2-Swirl and all the time on F12-HighPeaks on 
road.

So my idea is:
1. To cast a ray from car to camera pos (it can hit something before)
or maybe even make the camera a dynamic object with a spring joint in bullet 
(too fancy probably).

2. Add some checking of terrain or road slope under car, eg. 4 raycasts to get 
the normal then angle, that would bend the camera's pitch when eg. driving up 
or down a road that not in let's say +-15 degrees slope.
But this needs to know somehow the yaw angle of road, so there is no effect 
when driving on banked road. But I don't quite know how to do this. Or just use 
car yaw angle for that. Also how will this (or should) behave in loops ?
Some smooth transition would be best, but instant for camera eg. in terrain.

Original comment by Cry...@gmail.com on 23 Feb 2012 at 5:03

GoogleCodeExporter commented 9 years ago
Still, isn't easy, lots of tweaking, not sure if it will work, and I also think 
that for those tracks it's just best to drive with bonnet camera (car hood).

Original comment by Cry...@gmail.com on 23 Feb 2012 at 5:07

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Done 2. Camera tilt is implemented, but needs some more tweaking.
Still todo. 1.

Original comment by Cry...@gmail.com on 14 Apr 2012 at 12:50

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
2. was fixed.
I made 1. now, works, just need some tweaking to ignore glass pipe.

Original comment by Cry...@gmail.com on 19 Mar 2013 at 8:29

GoogleCodeExporter commented 9 years ago
Works now only for terrain.
Seems not working well with aboveTerrain check so its disabled.
Would work well for all but, need to deal with pipe glass, and disable in 
loops, goes crazy inside.

Original comment by Cry...@gmail.com on 19 Mar 2013 at 10:37

GoogleCodeExporter commented 9 years ago
-- Need to:
Fix jumps when changing cameras or pressing F4 or F12 (tilt and dist ray - 
smooth lag).
Fix over terrain check, either add it back, or make dist ray work with normal 
or camera near, sometimes camera cuts through terrain.

New:
3. Camera move after car hit. With some spring/smooth and using hit info 
(force, normal).

Original comment by Cry...@gmail.com on 3 Apr 2013 at 6:21

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Fixes done.

Original comment by Cry...@gmail.com on 24 Apr 2013 at 8:40

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
New stuff in issue 264.

Original comment by Cry...@gmail.com on 8 Sep 2013 at 7:57