About Store Forum Documentation Contact



Post Reply 
Adding physics to Blocks
Author Message
Damian Offline
Member

Post: #1
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 smile

Damian
(This post was last modified: 08-23-2011 02:32 PM by Damian.)
08-23-2011 02:31 PM
Find all posts by this user Quote this message in a reply
Damian Offline
Member

Post: #2
RE: Adding physics to Blocks
Anyone ??
08-23-2011 06:27 PM
Find all posts by this user Quote this message in a reply
Dandruff Offline
Member

Post: #3
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 smile
(This post was last modified: 08-23-2011 06:53 PM by Dandruff.)
08-23-2011 06:51 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Adding physics to Blocks
create phys body first
08-23-2011 07:26 PM
Find all posts by this user Quote this message in a reply
Damian Offline
Member

Post: #5
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
Find all posts by this user Quote this message in a reply
Dandruff Offline
Member

Post: #6
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
Find all posts by this user Quote this message in a reply
Damian Offline
Member

Post: #7
RE: Adding physics to Blocks
yes wink
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
Find all posts by this user Quote this message in a reply
Post Reply