How to make your local player visible when using CalcView

I have a thirdperson view made with the CalcView hook, and I knew I would come across this but I have no idea how to fix it. How can I get my player model to draw? If you tell me to use

 function GM:ShouldDrawLocalPlayer() 
	return true

it doesn’t work.

I think ShouldDrawLocalPlayer does its own stuff, just hook a function to it that returns true instead.

You mean using hook.Add? Give me an example.

I guess he is talking about something like the example on this page **[Gamemode.CalcView](**

I’ve tried using that hook.Add method it doesn’t work.

Worked for me last time I tried I will take a look when I am on my main pc tomorrow

You need to offset the render position because you’re currently looking from inside the model to outside it - which means it’s invisible to you.

That’s exactly what I thought, but can I have an example? I’m very weak when it comes to vectors, offsets and all that.

local pos = pos - pl:GetAimVector() *0.1

Something along those lines.

still getting the invisible issue

Did you try to copy the example from ? If that doesn’t work, it may be a mod messing with ShouldDrawLocalPlayer

Yeah I tried that. Even to exact code, still doesn’t make my player visible.

Then its something else conflicting with it since that example works perfectly

I think I’m on the right route, i’ll release the code if it works

[editline]18th May 2011[/editline]

no it doesn’t i don’t run addons

I had something similar to this with my asteroids game mode, try setting the viewentity of the player to something other than the player, like an invisible prop just to test. I couldn’t see my ship when it was my view entity. Hope this helps.

What do you mean


I’ll experiment with it

Okay, so that works ,

[editline]19th May 2011[/editline]

Just incase anyone else was curious,

	local ent = ents.Create("prop_physics")
ent:SetNWString("owner", pl )
ent:SetPos( pl:GetPos() - (pl:EyeAngles():Forward()*200) + Vector( 0, 0, 100 ))
ent:SetParent( pl )
ent:SetAngles( pl:EyeAngles() )
ent:SetColor( Color(0,0,0,0))
	pl.VProp = ent

talk about ghetto

talk about shit ass tabbing