Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by Hodo33

  1. I did but it only shows bounds as collision type. Not sure if the Maya file used to create it has the collision mesh or not. This is what I was going by wheeledvehicle.cpp

    // Determinw wheel radius from the shape's bounding box.

    // The tire should be built with it's hub axis along the

    // object's Y axis.

    radius = shape->bounds.len_z() / 2;

  2. Loading a Cheetah in game and switching to object view does not show the wheels

    Looking at the wheel it says collision type as bounds. As for the datablock I use same numbers and I do have a cylinder as collision smaller than the wheel so not sure..

  3. My vehicles tires don't seem to actually touch the ground.

    I think the tire uses the bounding box for tire to ground collision. I have made the box smaller than the tire and still sits a little off the surface.

    I have altered the radius, collision tolerance, contact tolerance and it just wont touch the ground. Anyone point me in the right direction?

  4. If I made the var part of the datablock declaration rather than creating it in the onAdd() would it then cross network? and the object allocation will be one contiguous block rather than having to append a pointer?

    datablock StaticShapeData(BoxA)


    shapeFile = "art/shapes/boxes/boxa.dts";

    someNewVar = "22"; <<< putting this here more network friendly ?


  5. If I have an object say simple static shape

    datablock StaticShapeData(BoxA)


    shapeFile = "art/shapes/boxes/boxa.dts";


    Then in the onAdd

    function BoxA::onAdd(%this,%obj)


    %obj.type = 22; << memory for the object plus this extra data gets allocated at the time of creation ?


    so I create one in the game world

    new StaticShape(someBox) {

    Data left out for brevity...


    Later in the game I need more data about the object so I do something like this

    someBox.color = blue;

    Is the memory for this object freed then reallocated with a new size?

    I am getting a crash in game and I think it has something to do with poor coding techniques on my part.

    If I know before hand that I will need a color data should I add it into the datablock description or would it be ok to add in with the ::onAdd(%this,%obj) at the time of creation ?

  6. Using basic physics. As I said it works once but if I mount back to the bed without moving and get up again player falls through. I am using a spawnsphere with one meter size. the bottom point of the hedron is like 0.1 m above the floor. If I just do a unmount the player is standing in the middle of the bed so I needed to move him away.

    How do I post a direct image here? I.E. no url

  7. <?php

    $code = $_POST["code"]; // $tcpCode ACTION CALLED BY USER

    echo("CODE RECEIVED ".$code);



    case 1:




    function updateFile()



    $name = $_POST["sname"];

    $mis = $_POST["wmis"];

    $date = date("Y-m-d");

    $tab = "\t";

    $nl = "\n";

    $ipfile = "marsonetrack.txt";

    $file = fopen($ipfile, "a");






  8. My player needs rest so I provided a bed. Interact with bed, you get mounted in sitting pose and pops a dialog to get up.

    When you click the get up button it calls this:

    function serverCmdDoneBed(%client)


    %client.player.bedrep = 0;


    %bed = %client.player.bed;

    %client.player.bed = 0;

    %spawn = "bedSpawn"@%bed;


    %client.player.isMounted = false;


    I have a player spawn point called bedspawn1,2,3 etc all is well at this point.

    If the player sits on the bed again and gets up, they fall through the floor. Can be repeated and the spawn point is way above the floor.

    I have this same issue with a vehicle if I get in then out then in and back out I fall through the land.

    It's almost like the engine loses track of position or collision is lagging a update or it's not cleared. Been looking in the engine but can't see where it happens.

    anyone encounter this issue ?

  9. I have a door with a wheel that turns when you open it. When you close the door it should turn the wheel the other way.







    This does not work.... seems stopThread resets the seq to frame 0

    I changed the anim to not be cyclic and still does not work.

    What am I doing wrong here?

  10. This is the call


    this is the fail response in log

    Platform::openWebBrowser - Failed to open the HKCR\http registry key!!!

    The program is being run from downloads, just unzipped into a directory there.

    Works on my machine but not others. They tried run as admin as well it fails

  11. Look in core/scripts/client/cursor.cs

    function showCursor()


    if ($cursorControlled)




    function hideCursor()


    if ($cursorControlled)




    hope this helps

  12. This has worked for me in the past and copy/paste to a new app now it does not work. gameone.php exists on the server, just simple code to write to a text file

    %data = "code="@$TCPCode @ "&sname="@%sname @ "&wmis="@%mission;

    %httpCmd="POST /game/gameone.php HTTP/1.1\nHost: www.myweb.com:80\nUser-Agent: Torque/1.0 \nAccept: */*\nContent-Length: "@ strlen(%data) @"\nContent-Type: application/x-www-form-urlencoded; charset=UTF-8\n\n" @ %data;

    %this.send(%httpCmd @ " \r\n");

    function TCPObj::onLine(%this, %line)


    echo("TCP LINE "@%line); // returns HTTP/1.1 400 Bad Request


    Anyone know if things have changed since 1.5.2 ?

  13. I recall in the past I had to add

    overrideplatformcursor = true in guicanvas.cpp and h I will see if I can find the code

    end of guiCanvas.h add this


    bool mOverridePlatformCursor;


    void overridePlatformCursor( bool state = true )


    mOverridePlatformCursor = state;


    end of guiCanvas.cpp add this

    ConsoleMethod( GuiCanvas, overridePlatformCursor, void, 2, 3, "(value=true)" )


    bool value = true;

    if( argc > 2 )

    value = dAtob( argv[ 2 ] );

    object->overridePlatformCursor( value );


    in game script files main.cs at the end of createCanvas add this

    if (isObject(Canvas))


    return true;

    in script cursors.cs add the new cursor

    new GuiCursor(CrossHairCursor)


    hotSpot = "8 8";

    renderOffset = "0 0";

    bitmapName = "core/art/gui/images/crosshair_white";


    then any time in game script you want a different cursor

    function MEvent::onMouseEnter(%this,%b,%point,%m)




    Hope this helps...

  14. well I couldn't get 3.10 to build and we were so close to release with all the engine changes I had to stick with 3.8

    I'll try to code around it till I can merge the changes in, thanks...

  15. Got it in but not sure it's working properly. First off I use 3.8 ..and called NavMeshUpdateAroundObject. In my version the function didn't have a reference to mPathfindingIgnore in sceneObject.cpp / h so I added that but I can make the call and it returns. Not sure if the "ignore" is the only equate for that. Anyhow here is a link to a pic. I drive the vehicle in and make the call on exit and you can see the result ... http://www.hyperkat.com/Images/navmeshIssue.jpg

    Since this function checks worldbox and a vehicle box is off the ground because of the tires and the bot reference is on the ground do you think this might be an issue?

    If something protruded from a wall at waist high the bot will run into it? Or the octree checks for any path obstruction in vertical from worldbox on bot player.?

  16. @Azaezel and all others ... Sorry to take up so much of your time on this. I will make the engine changes and report back.

    Thanks to all for quick response ....

  17. I used the NavmeshUpdateAll and the NavMeshUpdateOne got in the editor and there is no clear area around the vehicle, same with hovercraft

    I open the editor and where it is blue the bots can walk. After calling this update it is still blue and bots still collide.

    The vehicle has a collision on it and I did a getWorldBox to make sure that was valid as well... any ideas ?

  18. Ok back to this. I don't know if this is the right way but it works. I find when I edit the mesh it won't over write the levels/zone.nav so I delete that file, edit and save the game, all is well. Navmesh works fine at this point.

    I had a question before about my character driving a vehicle into the area and the bots collide with it and you said "Only thing you can do is rebuild parts of the navmesh, which can happen fast enough" ... Can you tell me how to rebuild parts around where the vehicle sits. Seems if I move the vehicle within the mesh and jump out I have to do a instant rebuilt ?

    Thanks for any help

  • Create New...