Damian
Member
|
Adding physics to Blocks
I used a Tutorial about Blocks and i modified it. Now im trying to add Physics Support to each one block. I have about 500x500 blocks.
I tried
Code:
blocks.createActor();
but didnt work i tried too
Code:
blocks[BLOCK_NUMBER]
i dont know what to do ;(
Thanks for any help
Damian
(This post was last modified: 08-23-2011 02:32 PM by Damian.)
|
|
08-23-2011 02:31 PM |
|
Damian
Member
|
RE: Adding physics to Blocks
Anyone ??
|
|
08-23-2011 06:27 PM |
|
Dandruff
Member
|
RE: Adding physics to Blocks
Not sure why it doesn't work, but for now, you can try to use Edit::Blocks as your base class and make your own createactors() function. Then maybe do a custom update function to place the meshes on the actors.
kulesz got it working though, you can ask him
(This post was last modified: 08-23-2011 06:53 PM by Dandruff.)
|
|
08-23-2011 06:51 PM |
|
Esenthel
Administrator
|
RE: Adding physics to Blocks
create phys body first
|
|
08-23-2011 07:26 PM |
|
Damian
Member
|
RE: Adding physics to Blocks
I have like this:
Code:
world.generateWorld(300);
world.blocks.createPhysBody(Vec(1,1,1));
world.blocks.createActor();
in Init
But game won't start and in call stack i have that EE cant find something with PhysXCook
mayby should i do blocks seperatly??
(This post was last modified: 08-23-2011 09:39 PM by Damian.)
|
|
08-23-2011 09:26 PM |
|
Dandruff
Member
|
RE: Adding physics to Blocks
Did you create physx yet? In init
Code:
Physics.create(CSS_NONE, true, "../Installation/PhysX");
|
|
08-23-2011 09:55 PM |
|
Damian
Member
|
RE: Adding physics to Blocks
yes
Can i gen a id of block like that ? Blocks[0] i tried but didnt worked ;(
(This post was last modified: 08-23-2011 10:21 PM by Damian.)
|
|
08-23-2011 10:19 PM |
|