Menu

Demo GLSviewer_Skeletal_TGLmovement_Collisions

Help
Sergio
2017-08-09
2017-08-09
  • Sergio

    Sergio - 2017-08-09

    Hi. I need your help to improve a code which, after improved may be added as a demo. In the attached code I joined part of the demos GLSviewer & Skeletal plus some use of TGLmovement and spheres creation with collisions.The demo code is working but I do not know how to adjust certain things in it.
    Please compile and run it and click first the button WALK and wait for the actor to do a complete turn along the movement path. Doing this you will understand my questions below.

    The part where I included new code is only in the unit Fmain . Inside Fmain the code where I have doubts is after the point where I wrote ////// Sergio Feitoza inclusions*. The other parts and units came from the demo GLSviewer , were not changed and are not needed for the doubts below.

    Please try to help me with the following doubts, if possible doing corrections in the code. My doubts are:
    a) How to set the actor1 to be always looking in the direction of the movement ? Now the direction is fixed because I do not know the property of TGLmovement to make equal to UP vector of GLactor ? or use actor.roll ?
    b) Also the head of the actor is looking to the right side. It was correct before but possibly I changed something .
    c) How to make the NavCube to work properly ( as in the original GLSviewer) ? Please note that if I click in the cube it is not working. I thank you for Jerome in some previous comments two months ago he mentioned something about the NavCube.I need the NavCube in my code.
    d) How to improve the illumination (light source) maintaining the current colors? The actor is very dark
    e) When the actor goes near the two boxes spheres are created. After the actor pass a certain distance the spheres creation is intentionally finished . In this moment I need to make the spheres which are “flying” to disappear until new ones are created near the next box .How to do it ? I inserted a code but is not working …. if SphereMother.Children[i] <>nil then SphereMother.Children[i].free ;
    f) How to make the actor to change from “walking” to “run”. I inserted some lines but is not working (see the part of the code where I wrote /////// if distanceToTarget <10 then btnWalkClick(self)
    g) Why the collisions of the spheres with the walls work so bad. Many of the spheres to not reflect in the walls and pass directly through the walls.
    h) When I close the application, there is a stack overflow exception. How to clean this? I suppose that is something related to the TGLlines creation
    i) How to make invisible the white cube with edges just in the origin?

    I thank you all in advance
    Sergio Feitoza sergiofeitoza@cognitor.com.br

     
  • Sergio

    Sergio - 2017-08-09

    the attachment

     
  • Sergio

    Sergio - 2017-08-09

    figure

     
  • Jerome.D (BeanzMaster)

    Hi Sergio it smell goodl but i cannot help, you because i don't have Delphi.
    So I cannot test and see the result.

    Please next time don't use GLSViewer Demo As Template. Keep simply. A Form, a GLViewer, a GLScene, A Cadencer, A Material Lib your buttons for ui and that's see.

    Why ???

    Because it will be more simply to help you. We will can concentrate to the real problem.
    No functions for poluate behaviours.
    It will be more easy for me to convert to Lazarus and test
    It will more easy to integrate your projets to the examples branch.

    I take look but i'm borried to search in unit what you do exactly.
    This functions of GLScene is cool but for help you all this gadgets are annoying.

    Now for Question :
    a) I've answered in my last post on the subject
    b) I don't understand what you mean
    c) Try to create NavCube at last in FormCreate no at beginning of procedure
    d) I don't see what you see, so...
    e) idem, i don't see what the spheres do
    f) It's weird
    g) Surely missing something with your use of ODE
    h) Check your dynamics objects are well released
    I) How it created and by who ?

    Cheers and many thanks

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.