Truelegend
Member
|
Collision detection - problem.
Hello, i want to check a players[0] is colide with chrs[0].
I tried to do with tut but i dont understand.
On other engines i just do like that
if(collision(mesh1, mesh2))
// do someting...
can someone help
(This post was last modified: 04-13-2011 11:09 AM by Truelegend.)
|
|
04-13-2011 11:09 AM |
|
Dynad
Member
|
RE: Collision detection - problem.
You can use physics Cut for this
static Bool cuts(C Capsule &capsule, UInt groups=~0);
There is always evil somewhere, you just have to look for it properly.
(This post was last modified: 04-13-2011 11:13 AM by Dynad.)
|
|
04-13-2011 11:11 AM |
|
Truelegend
Member
|
RE: Collision detection - problem.
but how it works??
What i put in C Capsue and in UInt groups?
|
|
04-13-2011 11:15 AM |
|
Dynad
Member
|
RE: Collision detection - problem.
You take the capsule of player 1 and use the capsule of player 2 in the parameter.
e.g.
player[0].physics->cuts(player[1].physics);
its not the good syntax but u know what i mean
Groups:
enum ACTOR_GROUP // Actor Group (Actor::group)
{
AG_DEFAULT=0, // default group for all actors
// user defined groups should be in the range of 1..15
AG_CONTROLLER=28, // Controller
AG_DOOR =29, // Game::Door
AG_STATIC =30, // Game::Static
AG_TERRAIN =31, // Game::World Terrain
AG_NUM =32, // number of actor groups
};
There is always evil somewhere, you just have to look for it properly.
(This post was last modified: 04-13-2011 11:19 AM by Dynad.)
|
|
04-13-2011 11:18 AM |
|
Truelegend
Member
|
RE: Collision detection - problem.
so it is good?
Code:
if(player[0].physics->cuts(chrs[0].physics)//collison (Player : Character)
{
//if collision do something
}
It is good?
|
|
04-13-2011 11:24 AM |
|
Truelegend
Member
|
RE: Collision detection - problem.
but i cant do that
Players[0].Physics ...
|
|
04-13-2011 02:20 PM |
|
Seba
Member
|
RE: Collision detection - problem.
Sorry, but maybe you will make something on your own. Add every file from Source build project see what its make look to source and then download BM and do the same. After that if you don't know something write here. If you know c++/c this should be start to write your own game. Engine is really easy in use.
|
|
04-13-2011 02:28 PM |
|
Truelegend
Member
|
RE: Collision detection - problem.
Yeah it is. But it is my first game. I dont know lot of thing. eg. How to do shooting. How to put character going on waypoint (loop). And more thing like that. How you say i try compile all tutorials. then i will look for BM. and then i will start write my game.
|
|
04-13-2011 02:38 PM |
|
llynx
Member
|
RE: Collision detection - problem.
(04-13-2011 02:38 PM)Truelegend Wrote: Yeah it is. But it is my first game. I dont know lot of things
Most of us are still on our first games. You have to understand that figuring things out on your own is good for your own intellect, understanding how EE works, and becoming a better coder. We don't have a problem with you posting questions, but when its something you should be able to figure out, answering gets a bit tedious.
|
|
04-13-2011 03:46 PM |
|