CreateEntityBody - Issue with using CapsuleBody

All bugs related to the 3D engine
Axeman
User
User
Posts: 89
Joined: Mon Nov 03, 2003 5:34 am

CreateEntityBody - Issue with using CapsuleBody

Post by Axeman »

The capsule body used in the code below should allow x, y, z values at the end to set the bounding volume of the capsule. It only seems to allow one value after the Friction value, however.

To test, first run the code below (last tested with: PureBasic 6.00 LTS (Windows - x64)). For me, it throws an error complaining about an incorrect number of parameters used, even though the number of parameters should be correct. If I remove two of the last three characters (see the commented-out 'CreateEntityBody' line) then it runs fine, even though this should be incorrect.

PureBasic's 3D library seems to be rife with these problems. You don't have to dive too deep to find one - which makes it a constant two steps forwards, two steps backward proposition.

Code: Select all

InitEngine3D()
InitSprite()

If OpenWindow( 0, 0, 0, 800, 600, "Test", #PB_Window_BorderLess ) = 0 : Debug "Unable To create the main window." : End : EndIf
If OpenWindowedScreen( WindowID( 0 ), 0, 0, 800, 600 ) = 0 : Debug "Unable to create the screen." : End: EndIf ; Note that VSYNC will be enabled by default.


; -- Create test player.
test_player_mesh = CreateCapsule( #PB_Any, 0.5, 0.85 )
test_player_ent = CreateEntity( #PB_Any, MeshID( test_player_mesh ), #PB_Material_None, 0.0, 3.0, 0.0 )
CreateEntityBody( test_player_ent, #PB_Entity_CapsuleBody, 100.0, 0.5, 0.1, 1.0, 1.85, 1.0 ) ; This throws an error, even though it should be correct.
;CreateEntityBody( test_player_ent, #PB_Entity_CapsuleBody, 100.0, 0.5, 0.1, 1.0, 1.85, 1.0, 1.0, 1.0, 1.0 ) ; This throws an error, even though it should be correct.
;CreateEntityBody( test_player_ent, #PB_Entity_CapsuleBody, 100.0, 0.5, 0.1, 1.0 ) ; This works, even though it should be incorrect.

; >>> The capsule body should allow x, y, z values at the end to set the bounding volume of the capsule. It only seems to allow one value after the friction value, however.

Axeman
User
User
Posts: 89
Joined: Mon Nov 03, 2003 5:34 am

Re: CreateEntityBody - Issue with using CapsuleBody

Post by Axeman »

Any plans to actually fix this issue? Or at least acknowledge that it exists?

It may just be a debugger issue that would be fairly simple to fix.
User avatar
tft
User
User
Posts: 84
Joined: Mon Dec 29, 2008 9:34 am

Re: CreateEntityBody - Issue with using CapsuleBody

Post by tft »

It would really be nice if that were done. But there's a lot that doesn't quite work yet. Although I have encountered no significant problems in my current project. Since this will also be used by me in the future. I would be happy for it.

Code: Select all

;
; From German Help
;CreateEntityBody(#Entity, Typ [, Masse [, Restitution, Reibung [, GrößeX, GrößeY, GrößeZ [, AchseX, AchseY, AchseZ]])

;                     #Entity              Type            [Res,  Rei [ GX   GY   GZ  [ AX , ?  , ? ]]]     it is Wrong  2 Parameter fail!!!!
;CreateEntityBody( test_player_ent, #PB_Entity_CapsuleBody, 100.0, 0.5, 0.1, 1.0, 1.85, 1.0 ) ; This throws an error, even though it should be correct.

;                     #Entity              Type            [Res,  Rei [ GX   GY   GZ  [ AX , AY , AZ]]]  ?  it is Wrong  1 Parameter fail!!!!
;CreateEntityBody( test_player_ent, #PB_Entity_CapsuleBody, 100.0, 0.5, 0.1, 1.0, 1.85, 1.0, 1.0, 1.0, 1.0 ) ; This throws an error, even though it should be correct.

;                     #Entity              Type            [Res,  Rei [ GX   GY    GZ  ]]  ?  it is Wrong  1 Parameter fail!!!!
;CreateEntityBody( test_player_ent, #PB_Entity_CapsuleBody, 100.0, 0.5, 0.1, 1.0 ); ?   This works, even though it should be incorrect.

;CreateEntityBody( test_player_ent, #PB_Entity_CapsuleBody, 100.0, 0.5, 0.1 ); ? ,  ?   This works, even though it should be incorrect.
;CreateEntityBody( test_player_ent, #PB_Entity_CapsuleBody, 100.0, 0.5 ); ? ,  ? ,  ?   This not works

Even if it's fun to do things in 3D. So that's probably not a high priority for Fred. For selling it as a product. A bit unfortunate.

TFT
TFT seid 1989
Aktuelles Projekte : Driving School Evergarden
YouTube : Pure Basic to go
FaceBook : Temuçin SourceMagic Games
DISCORD : SourceMagic
W10 , i9 9900K ,32 GB Ram , GTX Titan , 3 Monitore FHD
ARDUINO Freak :-)
Post Reply