Menu

Moving object in a box without colliding with other objects

Help
Sergio
2017-09-08
2017-12-07
  • Sergio

    Sergio - 2017-09-08

    I am trying to find a demo showing how to move an object between two points in a box without coliding with other (fixed) objects inside the box. Do anyone know where I can find . Please see the attached figure

     
  • Sergio

    Sergio - 2017-09-08

    The figure

     
  • Daniel

    Daniel - 2017-09-08

    Can you use a set movement path or are the obstacles in different positions each run?

     

    Last edit: Daniel 2017-09-08
  • Jerome.D (BeanzMaster)

    Hi to all, Like Daniel say you can use Movement part to Move you object. If obstacles are statics. If not you can take look to samples in the Branch /Examples/Path. (PathFinder, FindPath3D, PathMotion)

    Cheers

     
  • Sergio

    Sergio - 2017-09-09

    Hi. and thanks.
    I this first trial the obstacles are static (fixed position)
    After several trials with Movement I started to use the (easier) GLlines + TcubicSpline as in the good demo PathMotion. There is one thing that I stil do not inderstand in PathMotion demo. Why the cube moves correctly with the rigth slope (equal to the path) if the UP vector is fixed (0,1,0) ?
    The proper demo for what I need seems to be PathFinder. I am studying the source code to understandthe startegy to create the red path passing in the intervals of the fixed cubes (buildings). I think the key part is the procedure GetPath.
    There are some different ways to do path planing with collision avoidace. For the moment I am trying to find an easy one (hope .is the one in PathFinder)

     
  • Daniel

    Daniel - 2017-09-11

    This piece of code seems to deal with the slope! From the PathMotion demo.
    ship.Direction.setvector(ship_path.SplineSlopeVector(ship_time));

     

    Last edit: Daniel 2017-09-11
  • Jerome.D (BeanzMaster)

    Well seen Daniel, i passed throught this function ;)

     
  • Sergio

    Sergio - 2017-12-07

    Maybe the source demo attached can be useful to some of you. It is the PathFinder but using an actor plus some additions; It is working.If sometimes (not always) , when running, a message "Argument out of range"then close and run again. The created path maybe " difficult" or very ear a barrier.. When I stopped to play with it some months ago I was trying to dothe following. The actor goes from the the starting point to the end point several times using the same time..It works I was trying do it in such that when the actor arrives to the end point, a new different path is created (the end point now is the previous start point).If someone try to do it and suceed please post the code here.

     

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.