Page 2 of 2

Re: Physics need a fix?

Posted: Sun Jun 29, 2014 7:35 pm
by Danilo
Bananenfreak wrote:But there´s a Problem with your brain.
If you write it un-personalized/non-personal, like "the human brain...", it would sound better in my opinion.

Re: Physics need a fix?

Posted: Mon Jun 30, 2014 5:42 am
by coco2
Anything in reference to "your brain" is usually always considered sarcastic and an insult in english. When a native English speaker reads your post they may still conclude that you are not trying to insult and can understand what you are saying. What you are describing is an effect of the "human brain's perception".

Re: Physics need a fix?

Posted: Mon Jun 30, 2014 6:54 am
by Bananenfreak
Ok, no personal address anymore ;)
Thank you for your help.

Re: Physics need a fix?

Posted: Mon Jun 30, 2014 7:36 am
by infratec
@Thade

what Bananenfreak ment was:

The human brain and not someones special brain.

Like the optical effects from M.C. Escher which makes use of the 'faults' in our brains.

Bernd

Don't know why, I'm always to late. :oops:

Re: Physics EXAMPLES need a fix?

Posted: Thu Jul 03, 2014 12:07 am
by Thade
Thanks for the explanations :)

Back to physics ...

The manual (physics commands) is not very clear in many cases (actually it is hard for me to understand what is meant in many cases) - but sometimes its even confusing:

EntityFixedYawAxis(#Entity, Enable [, VectorX, VectorY, VectorZ])
Description: Change the fixed yaw axis of the entity. The default behaviour of a entity is to yaw around its own Y axis.

AttachEntityObject(#Entity, Bone$, ObjectID [, x, y, z, Pitch, Roll, Yaw])
Description: Attach an existing object to an entity bone. An object can be detached from an entity with DetachEntityObject().

In Blitz3D and all other 3d-Engines I know its Pitch Yaw Roll around x y z
And in the description of EntityFixedYawAxis I read: The default behaviour of a entity is to yaw around its own Y axis. What I find normal.
But why is it Pitch Roll Yaw in AttachEntityObject instead of Pitch Yaw Roll?

Re: Physics need a fix?

Posted: Thu Jul 03, 2014 5:18 pm
by Bananenfreak
I think this is referenced the wrong way...
In the Infoline in bottom of the IDE there is Yaw on right place (Second angle Argument).

Another question:
How to handle with those additional arguments?
Here I have a code, but they don´t seem to work?!

Code: Select all

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;>>                             >>
;>>  Name: 3D-Template          >>
;>>                             >>
;>>  Author: Bananenfreak       >>
;>>                             >>
;>>  Date: 03.07.2014           >>
;>>                             >>
;>>  OS: Windows                >>
;>>                             >>
;>>                             >>
;>>                             >>
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
EnableExplicit


Define.f KeyX, KeyY, MouseX, MouseY
Define nx.f, nz.f, Boost.f = 1, Yaw.f, Pitch.f
Define.i Quit, boden, mCube

Dim cubes.i(3)

#kam_0 = 0
#window = 0
#plane = 0
#planent = 0

If InitEngine3D()
  
  Add3DArchive(#PB_Compiler_Home + "Examples/3D/Data/Textures", #PB_3DArchive_FileSystem)
  Add3DArchive(#PB_Compiler_Home + "Examples/3D/Data/Scripts", #PB_3DArchive_FileSystem)
  Parse3DScripts()
  
  InitSprite()
  InitKeyboard()
  InitMouse()
  
  OpenWindow(#window, 0, 0, 1800, 1000, "3D-Template", #PB_Window_ScreenCentered)
  OpenWindowedScreen(WindowID(#window), 10, 10, 2000, 2000, 0, 10, 10, #PB_Screen_SmartSynchronization)
  
  WorldShadows(#PB_Shadow_TextureAdditive, 200, RGB(255 * 0.2, 255 * 0.2, 255 * 0.2), 4096)
  
  AmbientColor(RGB(255 * 0.2, 255 * 0.2, 255 * 0.2))
  
  CreatePlane(#plane, 100, 100, 100, 100, 100, 100)
  boden = GetScriptMaterial(#PB_Any, "Scene/GroundBlend")
  CreateEntity(#planent, MeshID(#plane), MaterialID(boden), 0, 0, 0)
  
  mCube = CreateCube(#PB_Any, 1)
  cubes(0) = CreateEntity(#PB_Any, MeshID(mCube), #PB_Material_None, 10, 0.5, 10)
  cubes(1) = CreateEntity(#PB_Any, MeshID(mCube), #PB_Material_None, 0, 1, 0)
  cubes(2) = CreateEntity(#PB_Any, MeshID(mCube), #PB_Material_None, 0, 0.5, 10)
  cubes(3) = CreateEntity(#PB_Any, MeshID(mCube), #PB_Material_None, 0, 0, 0)
  AttachEntityObject(cubes(0), "", EntityID(cubes(1)), -1, 0, 1, 0, 45, 0)
  
  ;-Camera
  CreateCamera(#kam_0, 0, 0, 100, 100)
  MoveCamera(#kam_0, 0, 20, 0, #PB_Absolute)
  CameraLookAt(#kam_0, 20, 0, 20)
  CameraRange (#kam_0, 2, 5000)
  CameraFOV   (#kam_0, 90)
  CameraBackColor(#kam_0, RGB(0, 0, 0))
  
  Repeat
    Repeat
    Until WindowEvent() = 0
    
    If ExamineMouse()
      Yaw   = -MouseDeltaX() * 0.05
      Pitch = -MouseDeltaY() * 0.05
    EndIf
    
    If ExamineKeyboard()
      
      If KeyboardPushed(#PB_Key_Up)    
        MoveCamera(0,  0, 0, -1 * Boost)
      ElseIf KeyboardPushed(#PB_Key_Down)
        MoveCamera(0,  0, 0,  1 * Boost)
      EndIf 
      
      If KeyboardPushed(#PB_Key_Left)  
        MoveCamera(0, -1 * Boost, 0, 0) 
      ElseIf KeyboardPushed(#PB_Key_Right)
        MoveCamera(0,  1 * Boost, 0, 0)
      EndIf 
      
    EndIf
    
    RotateCamera(0, Pitch, Yaw, 0, #PB_Relative)
    
    RenderWorld()
    FlipBuffers()
  Until KeyboardPushed(#PB_Key_Escape) Or Quit = 1
  
Else
  MessageRequester("Error", "The 3D Engine can't be initialized", 0)
EndIf

End

Re: Physics need a fix?

Posted: Fri Jul 04, 2014 10:37 am
by Comtois
Thade wrote: AttachEntityObject(#Entity, Bone$, ObjectID [, x, y, z, Pitch, Roll, Yaw])
Description: Attach an existing object to an entity bone. An object can be detached from an entity with DetachEntityObject().
But why is it Pitch Roll Yaw in AttachEntityObject instead of Pitch Yaw Roll?
Doc is wrong, it's always Pitch, Yaw, Roll

Re: Physics need a fix?

Posted: Fri Jul 04, 2014 10:42 am
by Comtois
Bananenfreak wrote: How to handle with those additional arguments?
Here I have a code, but they don´t seem to work?!
That's right those arguments are used only for bones, else it can be done this way :

Code: Select all

  AttachEntityObject(cubes(0), "", EntityID(cubes(1)))
  MoveEntity(cubes(1), -1, 0, 1)
  RotateEntity(cubes(1), 0, 45, 0)

Re: Physics need a fix?

Posted: Fri Jul 04, 2014 11:22 am
by Bananenfreak
Comtois wrote:
Bananenfreak wrote: How to handle with those additional arguments?
Here I have a code, but they don´t seem to work?!
That's right those arguments are used only for bones, else it can be done this way :

Code: Select all

  AttachEntityObject(cubes(0), "", EntityID(cubes(1)))
  MoveEntity(cubes(1), -1, 0, 1)
  RotateEntity(cubes(1), 0, 45, 0)
Oh, then this would be also a good information for the doc.