Animate strange behavior.
Blitz3D Forums/Blitz3D Programming/Animate strange behavior.
| ||
Hello, I have a strange behavior when I load an animated model, a bear trap, which has an animation of opening and closing. The fact is that if you do not use the Animate command looks like this. On the other hand if you use the Animate command, as the animation runs in the right place, but the idea is only run when the character is on the trap.![]() ; Animate trampa1\mesh\modelo%,3,.7,0 |
| ||
![]() ![]() Objeto Trampa. ; ================== Function Init_ObjTrampa.CTrampas(nameZip$, fileMesh$,nombre$="", padre%= 0) Local obj.CTrampas = New CTrampas obj.CTrampas\mesh% = ZLoadAnimMesh(nameZip$, fileMesh$, padre% ) If nombre$ = "" Then idTrampa% = idTrampa% + 1 obj.CTrampas\nombre$ = "Trampa Osos " + idTrampa% Else obj.CTrampas\nombre$ = nombre$ End If If obj.CTrampas <> Null And obj.CTrampas\mesh% Then InfoDepurador(obj.CTrampas\nombre$) Else InfoDepurador(obj.CTrampas\nombre$,"Fail") End If Return obj.CTrampas End Function Function DeleteObjTrampa%() Local obj.CTrampas = Null For obj.CTrampas = Each CTrampas idTrampa% = 0 obj\nombre$ = "" If obj\mesh% Then FreeEntity obj\mesh% ; obj\mesh% = 0 End If Delete obj.CTrampas Next End Function |
| ||
Ok, no problem, change positionMesh por PositionEntity. :) |
| ||
You don't want to use ScaleMesh(), RotateMesh(), PositionMesh(), to scale, rotate, position, a rigged skinned animated mesh because these functions will change the coordinates of the vertices but not of the joints ("bones"). |