About Store Forum Documentation Contact



Post Reply 
Physics after csg
Author Message
Rogus Offline
Member

Post: #1
Physics after csg
Hi.
I'm using csg to make windows and doors in my medieval tower. Everything is ok but after it i must change physbody. How can i generate it? I think generating phisbody from mesh it's not really optimal way but only one(?). In that tower i made stairs for my NPC and some details.

And second problem connected with it.
When i'm trying generate physbody from mesh it appears at center of the map and it's very small image1. After scalling and moving its flat... image2

Some code...
Code:
Towers[0].phys->parts.clear().New().createMesh(obj->mesh()->lod(0));
   Towers[0].actor.create(*(Towers[0].phys));
   Towers[0].actor.matrix(Towers[0].matrixScaled());
(This post was last modified: 07-12-2012 08:08 PM by Rogus.)
07-12-2012 08:05 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Physics after csg
hello
from EE actor headers
Code:
Matrix  matrix     (          )C;   Actor& matrix     (C Matrix  &matrix ); // get/set matrix     , 'matrix' must be normalized
matrix must be normalized means that you cannot set scale with this method.
you should either set the scale for the actor 'create' method, or better, create the phys body already scaled (scale the mesh and pass it to the phys body create method)
07-13-2012 01:33 PM
Find all posts by this user Quote this message in a reply
Post Reply