Making a cube 'scoot' to a location
Quote from Soundlogic on June 10, 2011, 11:35 amI am trying to get a cube scoot itself to a location, ideally with some of the pathfinding AI stuff, but I am having trouble figuring out how to make it move or find a path. Any advice?
Thank You,
Sound Logic
I am trying to get a cube scoot itself to a location, ideally with some of the pathfinding AI stuff, but I am having trouble figuring out how to make it move or find a path. Any advice?
Thank You,
Sound Logic
Quote from ChickenMobile on June 10, 2011, 11:50 amTry parenting the cube to a func_tracktrain that moves along path_track's until you have it where you want it to and unparent it.
I dunno about finding a path though, maybe elaborate more on what you mean??
Try parenting the cube to a func_tracktrain that moves along path_track's until you have it where you want it to and unparent it.
I dunno about finding a path though, maybe elaborate more on what you mean??
Quote from Soundlogic on June 10, 2011, 11:54 amThe npcs have pathfinding patterns that they use, and I would like to basically make a moving npc cube.
The npcs have pathfinding patterns that they use, and I would like to basically make a moving npc cube.
Quote from ChickenMobile on June 10, 2011, 12:10 pmI remember someone made a companion cube that followed the player and killed them when they came close. That's technically not pathfinding though...
You might have too look through HL2 code (or L4d2) and find similar code for certain npc's. If portal has coding for some sort of moving ai that would be a start. In portal both Wheatley and Glados move around and look at the player when you look around, this might be a start for ai?
/me never has played around with this though.
I remember someone made a companion cube that followed the player and killed them when they came close. That's technically not pathfinding though...
You might have too look through HL2 code (or L4d2) and find similar code for certain npc's. If portal has coding for some sort of moving ai that would be a start. In portal both Wheatley and Glados move around and look at the player when you look around, this might be a start for ai?
/me never has played around with this though.
Quote from Soundlogic on June 10, 2011, 12:12 pmHuh. Do you have any idea where the companion cube was? Was it for portal 2 or portal?
Thank you for your help,
Sound Logic
Huh. Do you have any idea where the companion cube was? Was it for portal 2 or portal?
Thank you for your help,
Sound Logic
Quote from ChickenMobile on June 10, 2011, 12:18 pmhttp://www.youtube.com/watch?v=SzW_6xeGapw
Though this is in garrys mod :SI can't find the original one, and I think it was Portal 1
http://www.youtube.com/watch?v=SzW_6xeGapw
Though this is in garrys mod :S
I can't find the original one, and I think it was Portal 1
Quote from Soundlogic on June 10, 2011, 12:40 pmHum... Well, I think I can use the func traintrack for movement, though a generic npc that just tells you what direction to go to get somewhere would be nice. Oh well. There don't seem to be any moving npcs in portal 2, and since we can't add entities I can't copy the code from the ones from half life and other games. Pity. If anyone has any other ideas though, I would love to hear them.
Thank You,
Sound Logic
Hum... Well, I think I can use the func traintrack for movement, though a generic npc that just tells you what direction to go to get somewhere would be nice. Oh well. There don't seem to be any moving npcs in portal 2, and since we can't add entities I can't copy the code from the ones from half life and other games. Pity. If anyone has any other ideas though, I would love to hear them.
Thank You,
Sound Logic
Quote from Soundlogic on June 10, 2011, 5:06 pmWell, I have an attempt at it, but it isn't working. Here is what I have so far:
Also: The cube should only move when it isn't being looked at, but that part should work just fine. The problem is in getting the cube to move at all.
Thank You,
Sound Logic
Well, I have an attempt at it, but it isn't working. Here is what I have so far:
Also: The cube should only move when it isn't being looked at, but that part should work just fine. The problem is in getting the cube to move at all.
Thank You,
Sound Logic
