06-20-2014, 05:22 AM
Same as in Lua.
Random Chitchat 2012-2016
|
06-20-2014, 05:22 AM
Same as in Lua.
06-20-2014, 05:24 AM
with BlockTracer?
06-20-2014, 05:29 AM
Do you want the direction or the block where the player is looking?
06-20-2014, 05:29 AM
Player.LookVector
I want to get the rotation, and then aply it to the pig, so it moves were the player is looking.
Also, a MoveToPosition to the block the player is looking should work. I've tried some codes and with this I change pig rotation, but it doesn't walk. Code: void cPig::Tick(float a_Dt, cChunk & a_Chunk)
06-20-2014, 05:45 PM
m_Attachee->GetLookVector() returns a unit vector (vector of length 1), when you add that to the position, it will only very rarely point to any other block than the position itself. Try multiplying the look vector by, say, 10. And you should probably search down for the nearest ground from there, don't want to send the pig trying to fly
Thanks given by: tonibm19
06-20-2014, 06:46 PM
06-21-2014, 03:25 AM
It should indeed. And our debatable physics.
06-21-2014, 05:15 AM
I'm not so sure - does our pathfinding work for flying mobs, too? If I send a ghast to XYZ, I don't want it to fly to the ground
Ohloh reports we're finally getting the comment percentage up a bit:
https://www.ohloh.net/p/mc-server/analys...es_summary |
« Next Oldest | Next Newest »
|