Parinesh-Baitule / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

Make the chase cam collide with environnement #292

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The chase cam goes through the environment.
Someone (sorry i don't remember who) contributed a Physics chase cam here 
http://pastebin.com/DVv59YSq
based on ray casting.

Normen suggested that we use a combination of CameraNode, PhysicsNode and 
ChaseCamera.

Got to setup a proper test case, and maybe a helper class.

Original issue reported on code.google.com by remy.bou...@gmail.com on 9 Feb 2011 at 8:27

GoogleCodeExporter commented 8 years ago

Original comment by remy.bou...@gmail.com on 9 Feb 2011 at 8:28

GoogleCodeExporter commented 8 years ago
Any news on this? My game will be unplayeble without this improvement.

Original comment by shirkit on 14 Sep 2011 at 1:20

GoogleCodeExporter commented 8 years ago
Well if you're in a hurry, grab the pastebin code and use it. It works.

Original comment by remy.bou...@gmail.com on 14 Sep 2011 at 2:53

GoogleCodeExporter commented 8 years ago
I did that, but I'm contributing to the JME. I started the conversion to the 
new camera API to make it more efficient. Sometimes it also doesn't stop before 
the terrain, so it goes inside it a bit. When I'm done I'll post it back.

Original comment by shirkit on 14 Sep 2011 at 9:57

GoogleCodeExporter commented 8 years ago
This will take longer than I expected =\

The only problem now is that the camera is changing it's position when the 
physics calculation are applied. I can't visualize where's the error. If 
someone could gimme a hand here.

Original comment by shirkit on 15 Sep 2011 at 1:58

Attachments:

GoogleCodeExporter commented 8 years ago
You might want to post it in the forum.

Original comment by quazir...@gmail.com on 15 Sep 2011 at 4:58

GoogleCodeExporter commented 8 years ago
Oh sorry, I almost fixed it all. Now I'm trying to make it extends the 
ChaseCamera and work correctly. Let's see if I have any luck, because some 
methods of ChaseCamera I needed are private and not protected.

Original comment by shirkit on 15 Sep 2011 at 5:56

GoogleCodeExporter commented 8 years ago

Original comment by ShadowIs...@gmail.com on 6 Sep 2012 at 5:35

GoogleCodeExporter commented 8 years ago
I wrote my own camera like this before I found this issue. Just a tip: One 
problem with the approach in Shirkits & the pastebin version that I found in my 
implementation is that it still clips the terrain if the camera is in a valley. 
I added ray tests in my version for the near frustum lower corners projected 
into the world. It works for my use case (I can ignore ceilings and some other 
things).

Original comment by jo...@zoom.nu on 24 Sep 2012 at 5:37

GoogleCodeExporter commented 8 years ago
any news on this?

Original comment by sebasoft on 22 May 2013 at 2:05