Originally Posted by
kung foo man
Would be useful if you post video with debug printbolds of normal + calculated angle.
And show your exact code with your orientToNormal function.
And try what IzNoGoD said: portal.angles = vectorToAngles(trace["normal"]);
And add more surfaces to your map, which aren't all straight walls. Lots of different slopes to test all kinds of trace normals (or just test in a stock map, should have more variety in surfaces).
The code behind the portal is this:
orientToNormal:
lookAt:
Its basically the same as in your portal mod. Its the stuff you have send me while i was trying to create the mod for cod4 years ago.
The only difference i have found is that vectorScale is a build in function now, but i tested it with your vectorScale function too, no differences.
I added more walls to my testmap so that there are more different angles to test on, i also added a few prints. If you need any other prints, let me know.
New Video:
https://www.youtube.com/watch?v=SunWQUnDbyU
In the video i'm using
Code:
orangePortal.angles = VectortoAngles(newPos["normal"]) + (0,90,0);
For now its the closest i can get to what i want.
As you can see, its perfect for walls in any angle, but as soon as it gets to the ground or some kind of a ramp, its not working anymore.
And for some reason the portal is sometimes stuck inside of the walls (starting at 9sec. in the video).
Originally Posted by
Ni3ls
Which COD is that in your video Trance?
Its Black Ops 3.