www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: kkl on November 16, 2014, 12:50:53 pm

Title: Get modelViewMatrix from object
Post by: kkl on November 16, 2014, 12:50:53 pm
Hi Egon,

Is there anyway to get modelViewMatrix from object? I need it for multiple sub-meshes location and direction (crowd animation with hardware skinning), so I can animate the submesh by using only one object to reduce drawcall.
Title: Re: Get modelViewMatrix from object
Post by: EgonOlsen on November 16, 2014, 02:23:42 pm
Translate the matrix returned by getWorldTransformation() by the negated camera position and multiply the resulting matrix with the camera's rotation matrix.
Title: Re: Get modelViewMatrix from object
Post by: kkl on November 16, 2014, 03:00:21 pm
It works like magic now! Thanks alot egon