Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Grant, AndrewAMD), 911 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
view entity should'nt react on the camera.arc #165963
11/05/07 17:57
11/05/07 17:57
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
I have an arrow as view entity which points into the direction of a next target. It works very well, but I want to change the camera.arc, depending on special situations ingame. Though, if I change the camera.arc, the arrows gets transformed, too.

I need a shader (or something else) that renders a view entity with a specific render setting (-> fixed camera arc!).

If you know how to do this (or maybe you did that once already), please contact me soon!

Cheers, Christian

Re: view entity should'nt react on the camera.arc [Re: HeelX] #165964
11/05/07 18:09
11/05/07 18:09
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
Perhaps you can solve this by using another view for the arrow?

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: view entity should'nt react on the camera.arc [Re: PHeMoX] #165965
11/05/07 20:48
11/05/07 20:48
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
... the arrow should be visible in the camera view ...

Re: view entity should'nt react on the camera.arc [Re: HeelX] #165966
11/06/07 10:10
11/06/07 10:10
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
maybe this gets you started. it has no lighting since i did this in the break at work.

Code:

float4x4 matWorld;
float4x4 matProj;
float4x4 matView;

struct VS_IN
{
float4 pos : POSITION;
float2 tex : TEXCOORD0;
};

struct VS_OUT
{
float4 pos : POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR0;
};

VS_OUT mainVS (VS_IN In)
{
VS_OUT Out;
float4x4 newProj = matProj;
newProj[0].x=2; //change those values to your need
newProj[1].y=2;
newProj[2].z=2;
float4x4 mat = mul(mul(matWorld,matView),newProj);

Out.pos = mul(In.pos,mat);
Out.tex = In.tex;
Out.color = float4(0.5,0.5,0.5,1.0);
return Out;
}

technique mwvp
{
pass p1
{
VertexShader = compile vs_2_0 mainVS();
PixelShader = null;
}
}



hint: you may want to use effect_load till you find the right values...
i hope it helps


www.earthcontrol.de
quoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
Re: view entity should'nt react on the camera.arc [Re: ello] #165967
11/06/07 17:49
11/06/07 17:49
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Thanks, I will try it out on one of these days!

Re: view entity should'nt react on the camera.arc [Re: HeelX] #165968
11/24/07 04:12
11/24/07 04:12
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
HeelX, were you able to fix this?

Since converting my project to Lite-C, I noticed that view entities no longer accept any arc value past the camera's. Now all my view entities do not show properly since they use the camera's arc value, where in the past, they would work since I defined another view with a fixed arc value. Even though the entities are assigned to the view with a fixed value, they still use the camera's.arc parameter. I tried Ello's code and could not get it to work, it just makes my view entity invisible.


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: view entity should'nt react on the camera.arc [Re: William] #165969
11/24/07 18:59
11/24/07 18:59
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
william, try playing around with the numbers as mentioned in the comment. it was a lot of testing to find the right values...

Re: view entity should'nt react on the camera.arc [Re: ello] #165970
11/25/07 21:03
11/25/07 21:03
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Hmm... I've tried quite a few numbers, but can't quite seem to get it visible. Would you have a hint of what might work, or at least the range of what I should be trying? What does those numbers represent?


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: view entity should'nt react on the camera.arc [Re: William] #165971
11/26/07 11:18
11/26/07 11:18
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Looks like this was the difference between C-script and Lite-C concerning this for anyone interested.

http://www.coniserver.net/ubbthreads/showflat.php/Cat/0/Number/802359/Main/802015/#Post802359


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1