About Store Forum Documentation Contact



Post Reply 
Camera Collision
Author Message
DoerrSt Offline
Member

Post: #1
Camera Collision
Hi,

I did try the camera collision sample and this is something I want to implement currently.

We created an level with small parts and the char can run around. So the physics looks good.

Now I tried the example:

Physics.move(ball, desired_camera.matrix.pos-ball.pos, ~IndexToFlag(AG_TERRAIN)); // use physics movement to move the ball as far as it can go without any collisions (ignore collisions with controllers)

As the single tiles are imported as Terrain class but the ball does not collide with the tiles. As the physic is set to "static mesh" I tried (as I saw it in another post) to use "AG_STATIC" but this does not exist (anymore?).

Do I need to change the class of the tiles to ACTORS::AG_TERRAIN, if yes how to do that? Or to I have to use another collision method?

Thanks!



Stefan
02-11-2014 11:17 PM
Find all posts by this user Quote this message in a reply
xzessmedia Offline
Member

Post: #2
RE: Camera Collision
hi,

you can always add Actor Groups like AG_STATIC or AG_MYNAME like this
Code:
enum ACTOR_GROUP
{
   // user defined groups should be in the range of 1..15
   AG_STATIC     = 1,
   AG_SOMETHING    = 2,
}


....
....

myactor.group(AG_STATIC);

By changing the class inside the model editor of esenthel (model editor -> Params)
you can attach an object class to it which will be linked to your code class.
So if i understood you right, you could leave the Object without a class (leave it as Terrain) and it should work..

You could also add a new class and subclass Game.Static like

class MyMultiPartThing:Game.Static
{

}

add a new OBJ_STATIC Object Class File :
Right Click -> New -> Object Class

add a new Static Obj List:
Game.ObjMemx<MyMultiPartThing> StaticParts; // container for Parts

and last add this to the world manager initialisation:
Game.World.setObjType(StaticParts, OBJ_STATIC);


Hope this helps. Best wishes!
02-12-2014 09:12 PM
Find all posts by this user Quote this message in a reply
DoerrSt Offline
Member

Post: #3
RE: Camera Collision
Thank you very much. I will test this. It's hard to get started as I did not found any tutorial about the programming part - only the Bloody Massacre example which is helpfull but it looks I could need some more "basic" help here ;-)
02-13-2014 01:19 AM
Find all posts by this user Quote this message in a reply
xzessmedia Offline
Member

Post: #4
RE: Camera Collision
i can really prefer to buy those sources as they really help to understand the engine...
really helpful is to look into the engine headers and read the comments.

i attached a small project maybe it helps to understand the workflow
http://code.xzessmedia.de/esenthel/smallproject.zip

have fun with this great engine.. i know and love it for 1 1/2 years now smile
02-13-2014 01:57 AM
Find all posts by this user Quote this message in a reply
DoerrSt Offline
Member

Post: #5
RE: Camera Collision
I really appreciate your support here. Thanks for the demo-project you've attached. Everything I see here helps me to understand the engine.

I bought it just some days ago and have done good progress since this. Every day I learn somewhat more and I really consider buying some sources from the shop - after studying the Massacre example :-)
02-13-2014 11:49 AM
Find all posts by this user Quote this message in a reply
Post Reply