entityorder bei Loadanimmesh
Übersicht

cooldoenerBetreff: entityorder bei Loadanimmesh |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Hallo,
FPS.., Waffe(3ds) lässt sich nicht auf den Vordergrund zeichen. EntityOrder scheint bei LoadAnimMesh nicht zu wirken. Gibts da einen Trick? Gruß, |
||
Dreamora |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Sicher das nicht sonst etwas was du gemacht hast falsch ist?
Wüsse nicht, warum transformations animation (was das einzige ist was 3DS kann) nicht mit entity order funktionieren sollte, da es das gleiche ist wie wenn du move, scale, rotate in B3D machen würdest. Source wäre also nicht schlecht. |
||
Ihr findet die aktuellen Projekte unter Gayasoft und könnt mich unter @gayasoft auf Twitter erreichen. |
cooldoener |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Code: [AUSKLAPPEN] Global pistol = LoadAnimMesh ("Data/sniper.3ds")
EntityOrder pistol, -1 Animate pistol,1,0.5,testAnim MoveEntity pistol,1000,13.5,1000 ScaleEntity pistol, 0.1,0.1,0.1 Hm, ich denke es müsste schon irgendwie an LoadAnimMesh liegen, denn wenn ich die Datei mit LoadMesh einlese und Animate weglasse klappt es auch mit dem EntityOrder. Aber ich will die Waffe animieren und und über LoadAnimMesh taucht die Waffe in terrain und Wände ein. Ich habe da was von: Try this. Hide the gun. Render the world. Set the cam mode to NOT clear the Z-Buffer (cameraclsmode) then, hide the world, and render just the gun. That way, it will always be on top. You can either hide the world, move the camera out of the world, or set the camerarange really small, so your only rendering the gun, in the second render. ..gelesen, hab ich aber nicht hin bekommen. "hide the world" und "render just the gun", wie geht'n das? Gruß |
||
Dreamora |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Das geht indem du die ganze Welt an 1 Pivot parentest und nun einfach dieses Pivot hidest. Danach zeigst du explizit die waffe wieder an und renderst mit geändertem CameraClsMode (true, false). Danach pivot wieder sichtbar machen und waffe hiden und CameraClsMode zurücksetzen. | ||
Ihr findet die aktuellen Projekte unter Gayasoft und könnt mich unter @gayasoft auf Twitter erreichen. |
cooldoenerBetreff: gelöst |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Hallo!
Habe ein Beispiel zur Lösung meines Problems gefunden: Code: [AUSKLAPPEN] Graphics3D 800,600 SetBuffer BackBuffer() Global camera = CreateCamera() CameraRange camera,0.1,1000 Global gun = CreateCylinder(8,True,camera) ; create a 8 seg cylinder, filled, and parented to the camera PositionEntity gun,1,-0.2,0 ScaleEntity gun,0.3,2,0.3 RotateEntity gun,90,0,0 Global light = CreateLight() Global world = CreatePivot() ; create a pivot called world ;just set up some cubes so there is something on screen. Parent these cubes to the world pivot, so ; you only need to hide the world pivot, to hide the level :o) Dim cube(40) For loop = 0 To 40 cube(loop) = CreateCube(world) ; parent all the objects in the level to the world pivot, for easy hiding EntityColor cube(loop) , Rand(100,255), Rand(100,255), Rand(100,255) PositionEntity cube(loop) , Rnd(-15,15), 0, Rnd(5,35) Next While Not KeyHit(1) If KeyDown(203) Then TurnEntity camera,0,1,0 If KeyDown(205) Then TurnEntity camera,0,-1,0 If KeyDown(200) Then MoveEntity camera,0,0,0.2 If KeyDown(208) Then MoveEntity camera,0,0,-0.2 If KeyHit(2) Then HideEntity world HideEntity gun ; hide the gun. You don't really NEED to hide the gun, as the next render will render over it, but no point in rendering it twice :) CameraClsMode camera,True,True ; set the camera cls mode so the last renderworld gets cleared UpdateWorld RenderWorld ; render the world ShowEntity gun ; show the gun and HideEntity world ; hide the world CameraClsMode camera,False,True ; set the camera cls mode so the last render to the backbuffer won't be cleared, only written on top of RenderWorld ; render the gun Flip ; flip the back buffer so it can be seen ShowEntity world ; show the world again for the next time Wend End [quote][/quote] Es wird einfach zweimal gerendert, genial! |
||
cooldoenerBetreff: Danke Dreamora!! |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Hallo, und Danke Dreamora!!
, da war ich wohl zu langsam mit dem posten... Vielen Dank für Deine schnelle und kompetente Hilfe! Viele Grüße, Sven |
||
![]() |
Markus2 |
![]() Antworten mit Zitat ![]() |
---|---|---|
Kann auch sein das du bei LoadAnimMesh bei allen
Child Entitys die EntityOrder setzen mußt . |
||
cooldoener |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Hallo,
Markus2 hat recht! Hab bei allen Childs die Entityorder gestetzt, jetzt ist alles bestens. Problem behoben. Danke Euch! Gruß |
||
![]() |
Markus2 |
![]() Antworten mit Zitat ![]() |
---|---|---|
Jup,
an deiner Stelle würde ich aber erstmal gucken wo der Objekt Mittelpunkt deiner 3ds Waffe ist weil normal wäre die bestimmt immer Sichtbar weil vor der Kamera oder ? Und warum Z=0 ? Und die skalierung deiner Szene würde ich anpassen . CameraRange camera,1,100000 |
||
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group