Results 1 to 5 of 5
  1. #1
    MSgt. Shooter Person
    Join Date
    Nov 2011
    Posts
    76
    Gamer IDs

    Gamertag: a beagle

    Default "Companion Cube" like object

    Ok so basically I want to use the physics gun to grab objects and move them around, so I can get on higher platforms, use certain doors, etc. However I have this issue with kactors where if I don't use "Pawn Can Base On," the player can actually use the "bounce" while using the physics grabber to essentially fly around a room. With "Pawn Can Base On" activated, when the player jumps and grabs the object underneath, the objects physics goes to sleep, and the object stops in mid-air at the location of the player collision, and the player can essentially use the object as a stepping stone to, once again, fly around the map. Is there any sort of fix to this?

  2. #2
    Boomshot
    Join Date
    May 2011
    Location
    Chicago
    Posts
    2,061

    Default

    The physics "gun" was put in as a way to just test kactors, so all of these problems you're experiencing are because it isn't meant to be used in game. You'll have to code a custom method of picking up objects that will not act like this. You can base that off of the physics gun probably as a start.

  3. #3

    Default

    Something you might consider is creating a weapon that performs the same function as the physics gun. You could insert code into the startfire function that stores a reference to the target you are pointing at, found using the trace functions, Once you have the reference you can then apply torque, force, thrust physics to the referenced object. Through game logic you could control all aspects of how the gun could control the object it was moving around. By using the physics functions you retain all rigid-body dynamics so you couldn't push the 'cube' through walls or other objects because the physics engine would prevent collisions.
    Last edited by Dragonfire1974; 07-16-2012 at 09:14 AM.

  4. #4

    Default

    Something you might consider is creating a weapon that performs the same function as the physics gun. You could insert code into the startfire function that stores a reference to the target you are pointing at, found using the trace functions, Once you have the reference you can then apply torque, force, thrust physics to the referenced object. Through game logic you could control all aspects of how the gun could control the object it was moving around. By using the physics functions you retain all rigid-body dynamics so you couldn't push the 'cube' through walls or other objects because the physics engine would prevent collisions.

  5. #5
    MSgt. Shooter Person
    Join Date
    Nov 2011
    Posts
    76
    Gamer IDs

    Gamertag: a beagle

    Default

    I did a bit more digging and managed to solve the problem, and the code is working great! I have actually implemented the grabber into the link gun as well as the alt fire. Thanks for the advise guys.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.