[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Limiting the origen of an entity

Limiting the origen of an entity

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Limiting the origen of an entity

Postby Nahuel » Thu Nov 17, 2011 6:26 pm

Hello forum. I posted a thread on pendulums made ​​a couple of months. The truth is that I have abandoned that qc and now I wish to return. I guess what I do is make two entities. one that determines the origin of the pendulum and the other is the movible entity.
So it would be something like:

0rigin
|
|
|
|
entity

So, speaking about the origin of the movible entity : (origin_y + origin_x + origin_z ) will be the same number all the time. How can i do that? How can I limit the origin in this way? Besides all this, i should add physics to the mobile entity. Should be, (for example for the shoots) by adding velocity to the origin of the attacker.
How can i do all this?? :| I am really lost... Thanks in advance
hi, I am nahuel, I love quake and qc.
User avatar
Nahuel
 
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: Limiting the origen of an entity

Postby Qrv » Thu Nov 17, 2011 11:40 pm

I really dont quite understand what you mean here.

You wish to limit the .origin of a moveable entity? Wouldnt that mean, it doesnt move?

EDIT:

Ok, after looking at the other thread, I think I get it...

Your diagram:

[Anchor Point]
|
|
|
|
[Moveable Thingy]


Anchor Point = A fixed position entity, which is where the Moveable Thingy 'connects', as in the vid of the swingable lights.

Moveable Thingy = A light bulb, lets say, attached via 'a wire' ( rope, realistically ) to the Anchor Point ( which would be a ceiling, lets say. )

Now, the Anchor point is quite simple, its just one entity with a pre-fixed origin, I assume.

The origin of the Moveably Thingy, surely cant be fixed. Its a moving object, the origin will change. You could limit it, I guess, so as to simulate a bulb on a wire, cuz the wire aint gonna stretch really.

I'd guess to limit it, you code in something that doesnt allow it to go a certain range away from the Anchor Point origin

so, if your Anchor Points origin is "0 0 0", you'd cap the Moveably Thingy origin at say, "-32 -32 -1" to "32 32 8" ( The Z clamping should allow it to 'bounce' up and down, instead of justing spinning around the Anchor Point, but this relies on your physics implementation. )
Limiting the origin of the Moveable Thingy is pretty simple as I see it, the thing that blows my mind is the physic you need.

As for getting the angle at which the Moveably Thingy should move, in regards to being shot, exploded, explosion splash damage, I have no idea here.

For making the "rope" ( ie, the wire from Anchor Point to Moveable Thingy ) piece, not exactly amazingly relevant, but this article might be of some use/interest: .

I believe with some tweaking you could make a rope of .mdls, not particles, to act as your wire that holds the Moveably Thingy ( light bulb).

I wish I could help more tho, as this stuff is way beyond my knowledge without me doing alot of learning, but I can easily see some of the effects you could make with this, esp. in regards to adding atmosphere to a level.
I'm looking for a Mapper, Modeller/Animator and a Sound effect/Music person, to work on an exciting project. PM Me here, or catch me on IRC for further info.
Qrv
 
Posts: 45
Joined: Thu Oct 20, 2011 7:43 am
Location: Stuck in a Slipgate.

Re: Limiting the origen of an entity

Postby DolphinsOfCydonia » Fri Nov 18, 2011 12:30 am

Do you literally want to model a pendulum?

I guess there's two ways to go about it. You could either not use Quake physics/or plugin physics at all, and write your own physics simulation in QuakeC. Or use quakes.

If you write your own mini physics simulation to model the pendulum, you're not going to get any interaction with other objects. I think going down this path is a worthwhile learning exercise - but it requires a little physics homework. Use MOVETYPE_NONE (is this correct?), and manually set the origin each frame. It will be spammy but whatever. Upside is you won't have to waste time trying to simulate rope, cos it will be all in the equations.

Alternatively you could look into jacking one into Gyro or something, but I havn't really researched into that plugin.
DolphinsOfCydonia
 
Posts: 21
Joined: Tue Nov 08, 2011 4:01 am


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 3 guests