Soooo.... i am trying to make camera collision with newton (i love uncle Isaac). So i have a cube, it collides with level. great success but there is my problem: when i attach my cube to camera (FPS style) - collision disappears thats bad, rly bad. why so? i actualy want to create something around camera so this 'something' would collide to the level. is there any way to make attached scene node collide to the rest of the level?
P.S. Yes, i used search till i got pain in my eyes - there was no actual answer
your going to have to apply forces to the box itself,and not let irrlicht move the camera. So you'll have to get the key presses,apply the rotations,and apply the forces. Its basicly a really ugly thing to do. You may wanna look at physx instead,cuz that has built in character controllers,its just a little harder of an sdk to implement,but when its implemented with irrlicht its very very good.
roxaz,
You may also want to try creating a general camera, and then attach the camera to the cube; not cube to the camera. From there do as benny53 said and in the event manager apply the forces from key presses, to the cube.
great idea, thx! btw i dont think its good to change good physics engine only for that there is lack of one feature and forces applying isnt so hard. actualy it will be very easy
may i ask why you decided to add phsyics to the camera ? . the camera only needs very basic collision and having it bound to a cube might create a few undesirable effects like for example having the camera roll over when the box falls or something like that.
franklyn wrote:may i ask why you decided to add phsyics to the camera ? . the camera only needs very basic collision and having it bound to a cube might create a few undesirable effects like for example having the camera roll over when the box falls or something like that.
"Game over"
If you don't have anything nice to say, don't say anything at all.
franklyn wrote:may i ask why you decided to add phsyics to the camera ? . the camera only needs very basic collision and having it bound to a cube might create a few undesirable effects like for example having the camera roll over when the box falls or something like that.
i liked how Gordon in hl2 walks over cans and kicks them. pretty cool huh? i want this too
or you know,the box falling over could simulate the actual character stumbling,and then you just apply forces for it to stand up. It could add a good effect to the game if you do it right...just an idea I'm throwing out:)
except for the fact that it doesnt take a lot for a box to topple over . it would probably look great if it was off a cliff but not so great if your just trying to run down a flight of stairs. also you could simulate the same physical responses with standard irrlicht collisions atleast i think you can im going to look into it.
i take my words back. applying forces rly sux! i think it would be possible to get such collision done if we could get object which collides with camera. then cam itself would apply a little impact to the object.
im not sure about how newton works but what you could do is apply a certain amount of force to any physics object that is within x radius of the camera. i think its possible to get the id of the object that you have collided with im not sure.
i tried to add simple irrlicht collision. result - no collisions between dynamic objects and camera. about adding force... something is not working for me. i can move body only with NewtonBodyAddImpact() or NewtonAddImpact() (dont remembher exactly), NewtonBodyAddForce() cant move my box whitch is on the ground. I tried to add huge ammount of force with NewtonBodyAddForce(), my object even got out of the NewtonWorld
can you create a box that is constrained to the camera ? so it doesnt rotate or swing. this was probably what you wanted to do in the first place. newton should have some kind of constraint that will lock the dynamic object to the camera.
hey mate i just found this http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=2110
its for ogrenewt (i think its just newton integrated into ogre) it might be helpful. i also found osme info in the ODE help page http://opende.sourceforge.net/wiki/inde ... ht_capsule . hope that helps if you get this figured out you should put up a tutorial .