Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
2 registered members (3run, AndrewAMD), 667 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Silly question about players PAN [Re: 3dgs_snake] #349044
12/03/10 13:22
12/03/10 13:22
Joined: May 2009
Posts: 5,367
Caucasus
3run Online OP
Senior Expert
3run  Online OP
Senior Expert

Joined: May 2009
Posts: 5,367
Caucasus
Really? Did it work? grin


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Silly question about players PAN [Re: 3run] #349047
12/03/10 13:44
12/03/10 13:44
Joined: Feb 2010
Posts: 320
TANA/Madagascar
3dgs_snake Offline
Senior Member
3dgs_snake  Offline
Senior Member

Joined: Feb 2010
Posts: 320
TANA/Madagascar
Yes, I think so, but I also think that it needs some tweaking to really look good grin.

Best regards.

Re: Silly question about players PAN [Re: 3dgs_snake] #349059
12/03/10 15:54
12/03/10 15:54
Joined: May 2009
Posts: 5,367
Caucasus
3run Online OP
Senior Expert
3run  Online OP
Senior Expert

Joined: May 2009
Posts: 5,367
Caucasus
Some times I even amaze myself grin
Thank you.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Silly question about players PAN [Re: 3run] #349063
12/03/10 17:24
12/03/10 17:24
Joined: May 2009
Posts: 5,367
Caucasus
3run Online OP
Senior Expert
3run  Online OP
Senior Expert

Joined: May 2009
Posts: 5,367
Caucasus
Shit...This didn't work as it needs to... frown
I'm asking you for help guys, cause other ways I'm gonna suicide!!!
I'm going crazy with this thing!!!
How can I turn players pan with mouse from ISOMETRIC view (when camera is on the top of the player) ???
I need turning to be comfortable!!! So player will aim easily!!
Here is the picture, how it looks like:

Cameras PAN is always equals to ZERO and I need player to turn his PAN and AIM around!!!
I really need your help guys!!! Thank you all.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Silly question about players PAN [Re: 3run] #349064
12/03/10 17:51
12/03/10 17:51
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
hopfel Offline
User
hopfel  Offline
User

Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
I made a little code a few months ago:

Code:
VECTOR vec1;
ANGLE ang1;

while(1)
{
vec_set(vec1,vector(mouse_pos.x,mouse_pos.y,10000));
vec_for_screen(vec1,camera);

my.skill1=c_trace(camera.x,vec1.x,IGNORE_SPRITES + IGNORE_MODELS);

vec_to_angle(ang1,vector(vec1.x-camera.x,vec1.y-camera.y,vec1.z-camera.z));
my.x=camera.x-(-my.skill1)*cos(ang1.tilt)*cos(ang1.pan);
my.y=camera.y-(-my.skill1)*cos(ang1.tilt)*sin(ang1.pan);
my.z=camera.z-(-my.skill1)*sin(ang1.tilt);
wait(1);
}



The my-Pointer has the position of the mouse on your level.
Now you can let your player look on it. (with Trigonometry or sth. like this)
Hope, I didn't forget to copy something from my script.
That was it, what you was looking for, right?
Best wishes, Hopfel


Hilf mir, dir zu helfen!
Re: Silly question about players PAN [Re: hopfel] #349067
12/03/10 18:33
12/03/10 18:33
Joined: May 2009
Posts: 5,367
Caucasus
3run Online OP
Senior Expert
3run  Online OP
Senior Expert

Joined: May 2009
Posts: 5,367
Caucasus
Player will rotate to the mouse cursor this way, am I right?
If so, I've already done that, but isn't what I'm looking for, that way its not comfortable for player turn around and aim...
Please guys, I need some good solution for this! I'm going crazy frown
Thank you hopfel.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Silly question about players PAN [Re: 3run] #350105
12/13/10 19:51
12/13/10 19:51
Joined: May 2009
Posts: 5,367
Caucasus
3run Online OP
Senior Expert
3run  Online OP
Senior Expert

Joined: May 2009
Posts: 5,367
Caucasus
Problem is still actuall. I didn't find any solution for this yet... All of the examples I've seen don't work the way I want them to... Please dudes, I need some help here. Please show me how can I make what I wanted to do (show me with script if possible)... Thank you all for your help.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Silly question about players PAN [Re: 3run] #350288
12/15/10 07:50
12/15/10 07:50
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline
User
the_mehmaster  Offline
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
Quote:
I need turning to be comfortable!!! So player will aim easily!!


I don't really understand what you mean by this..

But you could always use 'smooth()'

Code:
#include <acknex.h>
#include <default.c>
#include <camera.c>

FONT *fnt_arial = "Arial#14" ;

var force_x = 0 ;
var force_y = 0 ;
PANEL *pan_mouseForce = 
{
	digits ( 0, 0, "mouse_force.x = %0.2f", fnt_arial, 1, force_x ) ;	
	digits ( 0, 10, "mouse_force.y = %0.2f", fnt_arial, 1, force_y ) ;
	
	flags = SHOW ;	
}

void main()
{
	video_mode = 11 ;
	video_screen = 2;
	mouse_mode = 4 ;
        mouse_pointer = 0 ;
	
	// Load level
	level_load ( "" ) ;
	
	ENTITY *ent_player = ent_create ( "cube.mdl", nullvector, NULL ) ;
	
	
	camera.tilt = -90 ;
	camera.flags |= ISOMETRIC ;   
	vec_set (camera.x, ent_player.x) ;
	camera.z += 400 ;
	camera.arc = 10 ;
	
	VECTOR vec_mouse ;
	
	while(1)
	{
		// Transform mouse coordinates to screeen coordinates
		vec_set ( &vec_mouse, mouse_pos ) ;
		vec_for_screen ( &vec_mouse, camera ) ;
		
		// Transform coordinates to entity coordinates
		vec_sub ( &vec_mouse, ent_player.x ) ;
		
                // Calculate rotation angle from mouse position, centered to the player
		ent_player.pan = atan2v(vec_mouse.y, vec_mouse.x);
		
		// Debug
		force_x = mouse_pos.x ;
		force_y = mouse_pos.y ;
		smooth(ent_player.pan, 0.99);
		wait(1);
	}
}



If that's not what you want.. What do you mean by 'comfortable'?

Re: Silly question about players PAN [Re: the_mehmaster] #350320
12/15/10 13:06
12/15/10 13:06
Joined: May 2009
Posts: 5,367
Caucasus
3run Online OP
Senior Expert
3run  Online OP
Senior Expert

Joined: May 2009
Posts: 5,367
Caucasus
I just need to change player's PAN with the help of all mouse forces (X and Y as well)...
So, if player moves mouse upwards, player turns upwards...
If player moves mouse to the right, then player will turn to the right too...
Same as above, if player moves mouse to the left, then player will turn to the left too...
If player will move mouse down, then player must turn down... And so on.
That way it will be really easy and comfortable to AIM, cause player moves in Global coordinates and cameras PAN is fixed.
Aiming will be similar with AIMing that made in game Alien Shooter.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Silly question about players PAN [Re: 3run] #351775
12/28/10 14:24
12/28/10 14:24
Joined: May 2009
Posts: 5,367
Caucasus
3run Online OP
Senior Expert
3run  Online OP
Senior Expert

Joined: May 2009
Posts: 5,367
Caucasus
Cause if was really hard for me to explain, I decided to show you the video example of what I meant.
Here it is:
Lord Of the Ring Gameplay
The only difference is, that I need to turn player around with mouse, not with keys, and BTW how can I turn him exactly like in the video with WASD keys? I tried to use vec_to_angle and make player turn to walking direction, but looks weird. Thank you.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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