Hello!
I know a lot of people that prefer that items can be picked up through the wall. Me for example haha.
Well, let's go. It's super simple.
In AI_Player.cpp search for:
Code:if(distance > d) { // check dist to player if((objCenter - GetPosition()).LengthSq() > (maxDist*maxDist)) continue; // check if both player and camera are facing object if((GetPosition()-objCenter).Dot(gCam-objCenter) < 0.0f) continue; // check ray cast that you can see that item bool isVisible = false; r3dVector objSizeBBox = obj->GetBBoxWorld().Size/4; r3dVector posToTest[5] = {objCenter,objCenter+r3dVector(-objSizeBBox.x, objSizeBBox.y, -objSizeBBox.z), objCenter+r3dVector( objSizeBBox.x, objSizeBBox.y, -objSizeBBox.z), objCenter+r3dVector(-objSizeBBox.x, objSizeBBox.y, objSizeBBox.z), objCenter+r3dVector( objSizeBBox.x, objSizeBBox.y, objSizeBBox.z) };
Replace the red text for
Compile and be happy!Code:bool isVisible = true;
If i help you, rep+
Sorry bad english.


Reply With Quote![[Tutorial] How to Interact with objects through the wall](http://ragezone.com/hyper728.png)

